Skip to content

Commit

Permalink
Update nightly.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkWanderer authored Jul 27, 2024
1 parent 623c8fc commit 8fdd8aa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
- uses: octokit/request-action@v2.x
id: check_last_run
with:
route: GET /repos/${{github.repository}}/actions/workflows/nightly.yml/runs?per_page=1&status=completed
route: GET /repos/${{github.workflow_ref}}/runs?per_page=1&status=completed
env:
GITHUB_TOKEN: ${{ github.token }}

- run: |
echo Last nightly commit: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha }}
echo Current run commit: ${{ github.sha }}
echo Should run: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha != github.sha }}
outputs:
should_run: ${{ fromJson(steps.check_last_run.outputs.data).workflow_runs[0].head_sha != github.sha }}
Expand Down

0 comments on commit 8fdd8aa

Please sign in to comment.