File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ test " $1 " || { echo " Usage: delete-cache.sh cache-key" ; exit 1; }
3+ gh api --method DELETE \
4+ -H " Accept: application/vnd.github+json" \
5+ " /repos/scijava/pom-scijava/actions/caches?key=$1 " || true
Original file line number Diff line number Diff line change @@ -55,18 +55,16 @@ jobs:
5555 uses : actions/cache/restore@v4
5656 with :
5757 path : ~/.cache/pombast
58- key : ${{ runner.os }}-pombast-cache
58+ key : ${{ runner.os }}-pombast-build
5959
6060 - name : Run pombast melt+smelt commands
6161 run : .github/melt.sh
6262 shell : bash
6363
6464 - name : Delete old pombast cache
6565 if : always()
66- run : |
67- gh api --method DELETE \
68- -H "Accept: application/vnd.github+json" \
69- "/repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-pombast-cache" || true
66+ run : .github/delete-cache.sh "${{ runner.os }}-pombast-build"
67+ shell : bash
7068 env :
7169 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
7270
7573 uses : actions/cache/save@v4
7674 with :
7775 path : ~/.cache/pombast
78- key : ${{ runner.os }}-pombast-cache
76+ key : ${{ runner.os }}-pombast-build
7977
8078 - name : Publish smelt results
8179 if : always() && github.ref == 'refs/heads/master' && github.event_name == 'push'
Original file line number Diff line number Diff line change 2828 with :
2929 path : ~/.cache/pombast
3030 key : ${{ runner.os }}-pombast-status
31- restore-keys : ${{ runner.os }}-pombast-cache
3231
32+ # The monoqueue library is used by pombast to read GitHub issues.
3333 - name : Restore monoqueue cache
3434 uses : actions/cache/restore@v4
3535 with :
4444
4545 - name : Delete old pombast status cache
4646 if : always()
47- run : |
48- gh api --method DELETE \
49- -H "Accept: application/vnd.github+json" \
50- "/repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-pombast-status" || true
47+ run : .github/delete-cache.sh "${{ runner.os }}-pombast-status"
48+ shell : bash
5149 env :
5250 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5351
6058
6159 - name : Delete old monoqueue cache
6260 if : always()
63- run : |
64- gh api --method DELETE \
65- -H "Accept: application/vnd.github+json" \
66- "/repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-monoqueue-status" || true
61+ run : .github/delete-cache.sh "${{ runner.os }}-monoqueue-status"
62+ shell : bash
6763 env :
6864 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6965
You can’t perform that action at this time.
0 commit comments