Add nightly for Docker build

This commit is contained in:
Ben Adrian Sarmiento
2024-06-19 11:03:45 +02:00
parent 2abcfccddd
commit 8a7dd7bee2
2 changed files with 26 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ on:
tags:
- '*'
schedule:
- cron: '0 9 * * *'
- cron: '0 1 * * *'
jobs:
build:
@@ -32,13 +32,13 @@ jobs:
- name: Check out code
uses: actions/checkout@v4
- name: Check for New Commits (Nightly Only)
- name: Check for new commits (nightly only)
id: check
if: github.event_name == 'schedule'
continue-on-error: false
run: |
# 3AM CET
since="$(date -d 'yesterday' +%Y-%m-%d) 09:00:00"
since="$(date -d 'yesterday' +%Y-%m-%d) 01:00:00"
count=$(git rev-list --count --since="$since" --until=now HEAD)
if [ "$count" -gt 0 ]; then
echo "new_commits=true" >> $GITHUB_OUTPUT