diff --git a/.github/workflows/weekly.yml b/.github/workflows/weekly.yml index b92a922a..f3bdd2bf 100644 --- a/.github/workflows/weekly.yml +++ b/.github/workflows/weekly.yml @@ -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