mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
.github: revise weekly check
For details, see https://stackoverflow.com/a/67527144/1708249 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -10,22 +10,18 @@ on:
|
||||
jobs:
|
||||
schedule:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
run: ${{ steps.check.outputs.run }}
|
||||
steps:
|
||||
- name: Create cache file
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check for any commits since last week
|
||||
id: check
|
||||
run: |
|
||||
mkdir weekly
|
||||
echo ${{ github.sha }} > weekly/sha.txt
|
||||
|
||||
- name: Check SHA
|
||||
id: sha
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: weekly/sha.txt
|
||||
key: weekly-sha-${{ github.sha }}
|
||||
echo '::set-output name=run::'$(test -n "$(git log --format=%H --since=1 week ago')" && echo 'true' || echo 'false')
|
||||
|
||||
distcheck:
|
||||
needs: schedule
|
||||
if: ${{ needs.schedule.sha.outputs.cache-hit != 'true' }}
|
||||
if: ${{ needs.schedule.check.outputs.run == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
|
||||
Reference in New Issue
Block a user