Skip to content

Commit 547e6b3

Browse files
committed
fu/ci: convert differ to job under vib-build
Signed-off-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
1 parent 5d6516e commit 547e6b3

File tree

2 files changed

+26
-33
lines changed

2 files changed

+26
-33
lines changed

.github/workflows/differ.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/vib-build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,29 @@ jobs:
113113
subject-name: ${{ env.IMAGE_URL }}
114114
subject-digest: ${{ steps.push.outputs.digest }}
115115
push-to-registry: false
116+
117+
differ:
118+
runs-on: ubuntu-latest
119+
container:
120+
image: ghcr.io/vanilla-os/nvidia:main
121+
if: github.repository == 'vanilla-os/nvidia-image' && github.ref_type == 'tag'
122+
needs: build
123+
124+
steps:
125+
- uses: actions/checkout@v4
126+
127+
- name: Generate package diff
128+
run: |
129+
lpkg --unlock
130+
PACKAGE_LIST=$(.github/gen_package_list.sh)
131+
apt-get install -y curl
132+
IMAGE_DIGEST=$(curl -s -L -H "Accept: application/vnd.github+json" \
133+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
134+
-H "X-GitHub-Api-Version: 2022-11-28" \
135+
https://api.github.com/orgs/Vanilla-OS/packages/container/nvidia/versions | grep -m1 name | sed -E 's/^\s*"name": "(.+)".*$/\1/')
136+
curl -X POST \
137+
-H 'Accept:application/json' \
138+
-H "Authorization:Basic $(echo -n "${{ secrets.DIFFER_USER }}:${{ secrets.DIFFER_PSW }}" | base64)" \
139+
-d "{\"digest\":\"${IMAGE_DIGEST}\",${PACKAGE_LIST}}" \
140+
${{ vars.DIFFER_URL }}/images/nvidia/new
141+
lpkg --lock

0 commit comments

Comments
 (0)