mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-03-10 00:23:29 +08:00
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.
This commit is contained in:
31
.github/workflows/check_nightly.yml
vendored
31
.github/workflows/check_nightly.yml
vendored
@@ -1,16 +1,19 @@
|
|||||||
# https://github.community/t/trigger-action-on-schedule-only-if-there-are-changes-to-the-branch/17887/2
|
# https://github.community/t/trigger-action-on-schedule-only-if-there-are-changes-to-the-branch/17887/2
|
||||||
check_date:
|
name: check_date
|
||||||
runs-on: ubuntu-latest
|
on: repository_dispatch
|
||||||
name: Check latest commit
|
jobs:
|
||||||
outputs:
|
check_date:
|
||||||
should_run: ${{ steps.should_run.outputs.should_run }}
|
runs-on: ubuntu-latest
|
||||||
steps:
|
name: Check latest commit
|
||||||
- uses: actions/checkout@v2
|
outputs:
|
||||||
- name: print latest_commit
|
should_run: ${{ steps.should_run.outputs.should_run }}
|
||||||
run: echo ${{ github.sha }}
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: print latest_commit
|
||||||
|
run: echo ${{ github.sha }}
|
||||||
|
|
||||||
- id: should_run
|
- id: should_run
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
name: check latest commit is less than a day ago
|
name: check latest commit is less than a day ago
|
||||||
if: ${{ github.event_name == 'schedule' }}
|
if: ${{ github.event_name == 'schedule' }}
|
||||||
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
|
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
|
||||||
Reference in New Issue
Block a user