forked from pantos-io/servicenode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PAN-2036] Clean docker cache for PR branch (pantos-io#45)
* feature: clean docker cache for PR branch
- Loading branch information
1 parent
ca24867
commit 14a29e0
Showing
3 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Clean | ||
|
||
# Collection of functions to clean any generated and no-longer-needed item | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
|
||
|
||
permissions: | ||
contents: read | ||
actions: write | ||
|
||
jobs: | ||
|
||
clean: | ||
name: "Clean" | ||
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 }}" | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters