From b628e821e80418d90caf68bcfe4a6f61ca806ae9 Mon Sep 17 00:00:00 2001 From: Ben Adrian Sarmiento Date: Mon, 24 Jun 2024 02:48:49 +0200 Subject: [PATCH] Trigger by tag for docker --- .github/workflows/build_docker.yml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 991635f..34520d9 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -3,9 +3,7 @@ name: Build Docker Image on: push: tags: - - 'v**' - schedule: - - cron: '40 0 * * *' + - '*' jobs: build-and-push-image: @@ -19,28 +17,10 @@ jobs: - name: Check out code uses: actions/checkout@v4 - - 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) 01:00:00" - count=$(git rev-list --count --since="$since" --until=now HEAD) - if [ "$count" -gt 0 ]; then - echo "new_commits=true" >> $GITHUB_OUTPUT - else - echo "no new commits found for nightly build" - exit 1 - fi - - name: Set version id: buildvars run: | - if [ "${{ github.event_name }}" = "schedule" ]; then - echo "version=$(date +'%Y.%m.%d-nightly')" >> $GITHUB_OUTPUT - else - echo "version=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT + echo "version=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_OUTPUT fi echo "built_at=$(date +%Y-%m-%dT%H:%M:%S)" >> $GITHUB_OUTPUT echo "git_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT