Skip to content

Commit

Permalink
small changes to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
taukakao committed Jan 29, 2024
1 parent 5b998d8 commit 5677d0e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/vib-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [ "main" ]
schedule:
- cron: '10 22 * * *'
- cron: '5 * * * *'
workflow_dispatch:

env:
Expand All @@ -15,18 +15,30 @@ jobs:
check_update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Check if there was an update to the base image
if: github.event_name != 'schedule'
run: |
apt-get install jq
bash ${GITHUB_WORKSPACE}/.github/workflows/check_image_update.sh
echo "exitcode=$?" >> "$GITHUB_OUTPUT"
curl https://differ.vanillaos.org/images/desktop > vanilla-image-info
echo "digest=$(jq -r '.image.releases[-1].digest' vanilla-image-info)" > digest.txt
- name: Update triggered manually
if: github.event_name == 'schedule'
run: |
echo "exitcode=0" >> "$GITHUB_OUTPUT"
- name: Save digest
uses: softprops/action-gh-release@v1
tag_name: "save-digest"
name: "Keeps track of the current digest"
with:
files: digest.txt

hello_world:
runs-on: ubuntu-latest
needs: check_update
Expand Down

0 comments on commit 5677d0e

Please sign in to comment.