Skip to content

Commit

Permalink
Add check for new commits for nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaioru committed Aug 5, 2022
1 parent b7f17b6 commit f26809e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/publish-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ on:
- cron: "0 0 * * *"

jobs:
check:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- id: should_run
continue-on-error: true
name: Check new commits
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"

publish:
needs: check
if: ${{ needs.check.outputs.should_run != 'false' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
Expand Down

0 comments on commit f26809e

Please sign in to comment.