Debian Codegraph @

.github/workflows/clean-cache.yaml

raw
1 name: Cleanup GH Actions Cache
2 on:
3 workflow_dispatch: {}
4 pull_request:
5 types:
6 - closed
7
8 permissions:
9 contents: read # Set default read-only permissions
10
11 jobs:
12 cleanup:
13 name: Cleanup Cache
14 runs-on: ubuntu-latest
15 permissions:
16 actions: write
17 if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged
18 steps:
19 - name: Harden the Runner (Step Security)
20 uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
21 with:
22 egress-policy: audit
23
24 - name: Checkout Repo
25 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26 with:
27 persist-credentials: false
28
29 - name: Clean Cache
30 uses: ./.github/actions/clean-cache
31 with:
32 gh-token: ${{ secrets.GITHUB_TOKEN }}
33 gh-repo: ${{ github.repository }}
34 branch: refs/pull/${{ github.event.pull_request.number }}/merge