Skip to content

Commit

Permalink
Merge pull request #19 from rlabinc/main
Browse files Browse the repository at this point in the history
Build new image if push detected
  • Loading branch information
origamiofficial committed Aug 9, 2023
2 parents 4955b1a + 689ef47 commit 5b7a96b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Latest Build & Push
on:
push:
schedule:
- cron: '0 0 * * *'

Expand All @@ -17,6 +18,7 @@ jobs:
ref: main
-
name: Base image update check
if: github.event_name == 'schedule'
id: base_update_check
run: |
BASE_IMAGE_DIGEST=$(curl -s https://registry.hub.docker.com/v2/repositories/library/python/tags/slim | grep -oP '"digest":"\K[^"]+' | tail -1)
Expand All @@ -28,6 +30,13 @@ jobs:
echo "Base image has been updated. Continuing with the build..."
echo "build_image=true" >> $GITHUB_OUTPUT
fi
-
name: Github push check
id: git_push_check
if: github.event_name == 'push'
run: |
echo "GitHub push detected. Continuing with the build..."
echo "build_image=true" >> $GITHUB_OUTPUT
job02:
name: Build and publish
needs: [job01]
Expand All @@ -36,7 +45,6 @@ jobs:
steps:
-
name: Checkout
if: github.event_name == 'schedule'
uses: actions/checkout@v3
with:
ref: main
Expand Down

0 comments on commit 5b7a96b

Please sign in to comment.