Skip to content

Differ

Differ #86

Workflow file for this run

name: Differ
on:
workflow_run:
workflows: [Vib Build]
types:
- completed
jobs:
differ:
runs-on: ubuntu-latest
container:
image: ghcr.io/vanilla-os/pico:main
steps:
- uses: actions/checkout@v4
- name: Generate package diff
run: |
PACKAGE_LIST=$(.github/gen_package_list.sh)
apt install -f -y
apt 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/pico/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/pico/new