File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 55 workflow_dispatch : {}
66
77jobs :
8+ check_date :
9+ runs-on : ubuntu-latest
10+ outputs :
11+ should_run : ${{ steps.should_run.outputs.should_run }}
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : print latest_commit
15+ run : echo ${{ github.sha }}
16+
17+ - id : should_run
18+ continue-on-error : true
19+ if : ${{ github.event_name == 'schedule' }}
20+ run : test -z $(git rev-list --after="1 day" ${{ github.sha }}) && echo "::set-output name=should_run::false"
21+
822 publish :
9- # Prevent forks from running this job.
10- if : (github.event_name == 'schedule' && github.repository == 'GoogleChrome/lighthouse') || (github.event_name != 'schedule')
23+ # Prevent scheduled job from running if...
24+ # 1) this is a fork
25+ # 2) there has not been a change in the last day
26+ if : |
27+ github.event_name != 'schedule' ||
28+ (github.repository == 'GoogleChrome/lighthouse' && ${{ needs.check_date.outputs.should_run != 'false' }})
1129 runs-on : ubuntu-latest
1230 steps :
1331 - uses : actions/checkout@v1
You can’t perform that action at this time.
0 commit comments