We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da126d8 commit 07d2e81Copy full SHA for 07d2e81
action.yml
@@ -9,5 +9,10 @@ runs:
9
- shell: bash
10
run: |
11
gh extension install actions/gh-actions-cache
12
- defaultBranch=$(gh api repos/${ github.repository } --jq '.default_branch')
13
- gh actions-cache list --limit 100 | grep -v "refs/heads/${defaultBranch}" | cut -f 1 | xargs -I{} gh actions-cache delete --confirm {}
+
+ mergedPRNumbers=$(gh pr list --state merged --json number | jq .[].number)
14
15
+ for prNumber in $mergedPRNumbers
16
+ do
17
+ gh actions-cache list -B refs/pull/$prNumber/merge | cut -f 1 | xargs -I{} gh actions-cache delete --confirm {}
18
+ done
0 commit comments