From 661d37de0e791ffe9c21b6508963e5de9228481b Mon Sep 17 00:00:00 2001 From: Eliot Jones Date: Sat, 14 Aug 2021 13:10:23 -0400 Subject: [PATCH] nightly push action rework v2 very poor documentation for a dependent needs action/job. looks like it might be repository dispatch or it must be included in the main file. --- .github/workflows/check_nightly.yml | 31 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check_nightly.yml b/.github/workflows/check_nightly.yml index 31efed5f..88c56c95 100644 --- a/.github/workflows/check_nightly.yml +++ b/.github/workflows/check_nightly.yml @@ -1,16 +1,19 @@ # https://github.community/t/trigger-action-on-schedule-only-if-there-are-changes-to-the-branch/17887/2 -check_date: - runs-on: ubuntu-latest - name: Check latest commit - outputs: - should_run: ${{ steps.should_run.outputs.should_run }} - steps: - - uses: actions/checkout@v2 - - name: print latest_commit - run: echo ${{ github.sha }} +name: check_date +on: repository_dispatch +jobs: + check_date: + runs-on: ubuntu-latest + name: Check latest commit + outputs: + should_run: ${{ steps.should_run.outputs.should_run }} + steps: + - uses: actions/checkout@v2 + - name: print latest_commit + run: echo ${{ github.sha }} - - id: should_run - continue-on-error: true - name: check latest commit is less than a day ago - if: ${{ github.event_name == 'schedule' }} - run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" \ No newline at end of file + - id: should_run + continue-on-error: true + name: check latest commit is less than a day ago + if: ${{ github.event_name == 'schedule' }} + run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" \ No newline at end of file