-
Notifications
You must be signed in to change notification settings - Fork 6
36 lines (28 loc) · 999 Bytes
/
clean.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Clean
# Collection of functions to clean any generated and no-longer-needed item
on:
pull_request:
#types:
# - closed
permissions:
contents: read
repository-projects: write
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
disable-sudo: true
egress-policy: audit
- name: Clean Docker cache
env:
TARGET: ${{ runner.os }}-buildx-v1.0-service-node-${{ github.ref_name }}
run: |
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/pantos-io/servicenode/actions/caches?key=${{ env.TARGET }}"