Skip to content

Commit af74130

Browse files
committed
Purge the oldest TRAP cache with gh actions-cache cli
1 parent 3b459b5 commit af74130

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
5151
env:
5252
enable_install_doc: no
53-
CODEQL_ACTION_CLEANUP_TRAP_CACHES: true
5453

5554
strategy:
5655
fail-fast: false
@@ -81,7 +80,6 @@ jobs:
8180
uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
8281
with:
8382
languages: ${{ matrix.language }}
84-
dependency-caching: false
8583
debug: true
8684

8785
- name: Autobuild
@@ -122,3 +120,11 @@ jobs:
122120
with:
123121
sarif_file: sarif-results/${{ matrix.language }}.sarif
124122
continue-on-error: true
123+
124+
- name: Purge the oldest TRAP cache
125+
if: ${{ github.repository == 'ruby/ruby' && matrix.language == 'cpp'}}
126+
run: |
127+
gh extension install actions/gh-actions-cache
128+
gh actions-cache list --key codeql --order asc --limit 1 | cut -f 1 | xargs -I{} gh actions-cache delete {} --confirm
129+
env:
130+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)