22 lines
608 B
YAML
22 lines
608 B
YAML
name: check-date
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
|
|
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
|
|
if: ${{ github.event_name == 'schedule' }}
|
|
run: test -z $(git rev-list --after="23 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
|