Skip to content

[PAN-2036] Clean docker cache for PR branch #2

[PAN-2036] Clean docker cache for PR branch

[PAN-2036] Clean docker cache for PR branch #2

Workflow file for this run

name: Clean
# Collection of functions to clean any generated and no-longer-needed item
on:
pull_request:
#types:
# - closed
jobs:
if_merged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:

Check failure on line 14 in .github/workflows/clean.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/clean.yaml

Invalid workflow file

You have an error in your yaml syntax on line 14
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
disable-sudo: true
egress-policy: audit
- name: Clean Docker cache
run: |
target=${{ runner.os }}-buildx-v1.0-service-node-${{ github.ref_name }}
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/service-node/actions/caches?key=$target"