From 8b502cc1d5d54d1c41ac376647efb628c94f4cbd Mon Sep 17 00:00:00 2001 From: Jef LeCompte Date: Wed, 16 Jun 2021 20:35:46 -0400 Subject: [PATCH] ci: update nightly release --- .github/workflows/nightly-release.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/nightly-release.yaml b/.github/workflows/nightly-release.yaml index e1922bb..306bdcd 100644 --- a/.github/workflows/nightly-release.yaml +++ b/.github/workflows/nightly-release.yaml @@ -4,9 +4,24 @@ on: - cron: '0 0 * * *' workflow_dispatch: {} jobs: + check-date: + name: Check dates + runs-on: ubuntu-latest + outputs: + should-run: ${{ steps.code-change.outputs.should-run }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Check if code has changed with 24 hours + continue-on-error: true + id: code-change + run: | + [[ $(git rev-list --after="24 hours" --first-parent HEAD) ]] && echo "::set-output name=should-run::true" build-release: name: Build and release Docker image runs-on: ubuntu-latest + needs: check-date + if: needs.check-date.outputs.should-run == 'true' steps: - name: Checkout repository uses: actions/checkout@v2