Daily check for new commits in main #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily check for new commits in main | |
on: | |
# Every day at 01:42 AM UTC. | |
schedule: | |
- cron: "42 01 * * *" | |
jobs: | |
daily-change-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for new commits in main and trigger actions | |
run: | | |
if [ -z "$(git log -n1 --since=yesterday --oneline)" ]; then | |
exit 0 | |
fi | |
gh workflow run build_container.yaml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |