Skip to content

πŸ’‚ Update Guard #144

πŸ’‚ Update Guard

πŸ’‚ Update Guard #144

Workflow file for this run

name: πŸ’‚ Update Guard
on:
schedule:
- cron: '15 5 * * *' # 05:05am UTC everyday
workflow_dispatch: # you can also fire it manually
jobs:
check:
name: "Check image versions"
runs-on: ubuntu-latest
outputs:
diff: ${{ steps.compare.outputs.diff }}
steps:
- name: uCore Version
id: ucore
run: |
UCORE=$(
skopeo inspect docker://ghcr.io/ublue-os/ucore-minimal:stable-zfs --format \
'{{ index .Labels "org.opencontainers.image.version"}}')
echo "ucore_version=$UCORE" >> "$GITHUB_OUTPUT"
- name: vCore Version
id: vcore
run: |
VCORE=$(
skopeo inspect docker://ghcr.io/ta-vroom/vcore:latest --format \
'{{ index .Labels "org.opencontainers.image.version"}}')
echo vcore=$VCORE >> "$GITHUB_OUTPUT"
- name: Compare
id: compare
run: |
if [ "${{ steps.ucore.outputs.ucore }}" != \
"${{ steps.vcore.outputs.vcore }}" ]; then
echo "update=true" >> "$GITHUB_OUTPUT"
else
echo "update=false" >> "$GITHUB_OUTPUT"
fi
trigger-build:
needs: check
if: needs.check.outputs.diff == 'true'
runs-on: ubuntu-latest
steps:
- name: Kick off the build workflow
run: gh workflow run build.yml
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}