retrieves base image from recipe

This commit is contained in:
Tau 2024-02-02 02:03:45 +00:00
parent a8938cf8e5
commit c6d68b4b79

View file

@ -8,7 +8,6 @@ on:
workflow_dispatch:
env:
BASE_IMAGE: desktop
CUSTOM_IMAGE_NAME: custom
jobs:
@ -25,6 +24,12 @@ jobs:
- name: Install dependencies
run: sudo apt-get install jq
- name: Read base image name from recipe
run: |
BASE_IMAGE="$(cat recipe.yml | grep "ghcr.io/vanilla-os" | awk -F ' ' '{print $2}')"
echo The base image is $BASE_IMAGE
echo "BASE_IMAGE_TYPE=$(echo $BASE_IMAGE | awk -F '/' '{print $3}' | awk -F ':' '{print $1}')" >> "$GITHUB_ENV"
- name: get last successful run
if: ${{ github.ref_type == 'branch' }}
env:
@ -46,7 +51,7 @@ jobs:
run: |
touch digest.txt
mv digest.txt last_digest.txt
curl https://differ.vanillaos.org/images/${{ env.BASE_IMAGE }} > vanilla-image-info
curl https://differ.vanillaos.org/images/${{ env.BASE_IMAGE_TYPE }} > vanilla-image-info
jq -r '.image.releases[-1].digest' vanilla-image-info > digest.txt
echo Old digest is: $(cat last_digest.txt)
echo New digest is: $(cat digest.txt)