Skip to content

Commit

Permalink
ci: container prunning
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Dec 13, 2023
1 parent a978f01 commit ad19940
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/container-prune.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Container Image Cleanup

on:
push:
branches-ignore: [ main ]


jobs:
prune:
name: Prune Container Images
runs-on: ubuntu-latest
steps:
- name: Retrieve Credentials
id: import-secrets
uses: hashicorp/vault-action@v2.7.3
with:
url: https://vault.prism.spectrocloud.com
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
secrets: /providers/github/organizations/spectrocloud/token?org_name=spectrocloud token | VAULT_GITHUB_TOKEN

- uses: bots-house/ghcr-delete-image-action@v1.1.0
with:
owner: spectrocloud
name: librarium
token: ${{ steps.import-secrets.outputs.VAULT_GITHUB_TOKEN }}
untagged-keep-latest: 2

0 comments on commit ad19940

Please sign in to comment.