Skip to content

Commit

Permalink
fu/ci: convert differ to job under vib-build
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <[email protected]>
  • Loading branch information
kbdharun authored and taukakao committed Nov 10, 2024
1 parent de39920 commit a521eb3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 33 deletions.
33 changes: 0 additions & 33 deletions .github/workflows/differ.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/vib-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,29 @@ jobs:
subject-name: ${{ env.IMAGE_URL }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: false

differ:
runs-on: ubuntu-latest
container:
image: ghcr.io/vanilla-os/nvidia:main
if: github.repository == 'vanilla-os/nvidia-image' && github.ref_type == 'tag'
needs: build

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/nvidia/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/nvidia/new
lpkg --lock

0 comments on commit a521eb3

Please sign in to comment.