Skip to content

Commit

Permalink
feat: Add differ CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
matbme committed Dec 6, 2023
1 parent aa9c425 commit 4ed68eb
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/differ.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Differ

on:
workflow_run:
workflows: [Vib Build]
types:
- completed

jobs:
differ:
runs-on: ubuntu-latest
container:
image: ghcr.io/vanilla-os/core:main

steps:
- uses: actions/checkout@v4

- name: Generate package diff
run: |
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/core/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/core/new

0 comments on commit 4ed68eb

Please sign in to comment.