File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -34,10 +34,20 @@ jobs:
3434 run : |
3535 echo "last_run_id=$((${{ github.run_id }} - 1))" >> $GITHUB_OUTPUT
3636 - name : Download last run commit hashes
37+ continue-on-error : true
3738 uses : actions/download-artifact@v4
3839 with :
3940 name : commit-hashes.txt
4041 path : previous-run-hashes.txt
4142 github-token : ${{ secrets.GITHUB_TOKEN }}
4243 # Previous run
4344 run-id : ${{ job.get_last_id.last_run_id }}
45+ - name : Check if run needed
46+ run : |
47+ if [ ! -f previous-run-hashes.txt ]; then
48+ echo "No previous run hashes, need to re-run"
49+ elif cmp -s commit-hashes.txt previous-run-hashes.txt; then
50+ echo "Previous run hash same as this one, no need to re-run"
51+ else
52+ echo "Previous run hash different, need to re-run"
53+ fi
You can’t perform that action at this time.
0 commit comments