-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bf67abb
Showing
11 changed files
with
836 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ref: https://git-scm.com/docs/gitattributes | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
github: vanilla-os | ||
liberapay: fabricators |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
packages="" | ||
IFS=' | ||
' | ||
for line in $(dpkg -l --no-pager); do | ||
case "$line" in | ||
"ii"*) | ||
items=$(echo "$line" | sed -E "s/\\s+/ /g") | ||
name=$(echo "$items" | cut -d ' ' -f2 | cut -d ':' -f1) | ||
version=$(echo "$items" | cut -d ' ' -f3) | ||
packages="$packages{\"name\":\"$name\",\"version\":\"$version\"}," | ||
;; | ||
esac | ||
done | ||
|
||
packages="[${packages%,}]" | ||
printf "\"packages\":%s\n" "$packages" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Differ | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Vib Build] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
differ: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/vanilla-os/vm:main | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Generate package diff | ||
run: | | ||
lpkg --unlock | ||
PACKAGE_LIST=$(.github/gen_package_list.sh) | ||
apt-get install -y curl | ||
IMAGE_DIGEST=$(curl -s -L -H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
https://api.github.com/orgs/Vanilla-OS/packages/container/vm/versions | grep -m1 name | sed -E 's/^\s*"name": "(.+)".*$/\1/') | ||
curl -X POST \ | ||
-H 'Accept:application/json' \ | ||
-H "Authorization:Basic $(echo -n "${{ secrets.DIFFER_USER }}:${{ secrets.DIFFER_PSW }}" | base64)" \ | ||
-d "{\"digest\":\"${IMAGE_DIGEST}\",${PACKAGE_LIST}}" \ | ||
${{ vars.DIFFER_URL }}/images/vm/new | ||
lpkg --lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Vib Build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY_USER: ${{ github.actor }} | ||
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: vanilla-os/[email protected] | ||
|
||
- name: Build the Docker image | ||
run: docker image build -f Containerfile --tag ghcr.io/vanilla-os/vm:main . | ||
|
||
# Push the image to GHCR (Image Registry) | ||
- name: Push To GHCR | ||
if: github.repository == 'vanilla-os/vm-image' | ||
run: | | ||
docker login ghcr.io -u ${{ env.REGISTRY_USER }} -p ${{ env.REGISTRY_PASSWORD }} | ||
docker image push "ghcr.io/vanilla-os/vm:main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Vib PR | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: vanilla-os/[email protected] | ||
|
||
- name: Build the Docker image | ||
run: docker image build -f Containerfile --tag vanillaos/vm:validation . | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: Containerfile | ||
path: Containerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Containerfile | ||
sources/ | ||
downloads/ |
Oops, something went wrong.