.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:
Joachim Wiberg
2023-01-07 17:56:42 +01:00
parent 8bbae3d414
commit a918f7497a
+7 -11
View File
@@ -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