-
-
Notifications
You must be signed in to change notification settings - Fork 23
33 lines (29 loc) · 1.09 KB
/
differ.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Differ
on:
workflow_run:
workflows: [Vib Build]
types:
- completed
jobs:
differ:
runs-on: ubuntu-latest
container:
image: ghcr.io/vanilla-os/desktop:main
if: github.repository == 'vanilla-os/desktop-image'
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/desktop/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/desktop/new
lpkg --lock