Skip to content

Commit

Permalink
chore: delete images
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Gonzalez V. <[email protected]>
  • Loading branch information
sxd committed Oct 8, 2024
1 parent e2fce1f commit 1fe118f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/registry-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:

env:
IMAGE_NAME: "cloudnative-pg-testing"
ORG_NAME: "cloudnative-pg"
SNOK_TOKEN: ${{ secrets.REPO_GHA_PAT }}
ORG_NAME: "enterprisedb"
SNOK_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTAINER_IMAGE_NAMES: "pgbouncer-testing, postgresql-testing, postgis-testing"

jobs:
Expand All @@ -21,22 +21,20 @@ jobs:
# once issue https://github.com/snok/container-retention-policy/issues/33 is fixed
# we can merge the two steps into one
- name: Delete '-testing' images for ${{ env.IMAGE_NAME }}
uses: snok/container-retention-policy@v2
uses: snok/container-retention-policy@v3.0.0
with:
image-names: ${{ env.IMAGE_NAME }}
cut-off: 5 days ago UTC
keep-at-least: 1
account-type: org
org-name: ${{ env.ORG_NAME }}
keep-n-most-recent: 1
account: ${{ env.ORG_NAME }}
# use the GITHUB_TOKEN when issue https://github.com/snok/container-retention-policy/issues/27 is fixed
token: ${{ env.SNOK_TOKEN }}
- name: Delete '-testing' images for containers
uses: snok/container-retention-policy@v2
uses: snok/container-retention-policy@v3.0.0
with:
image-names: ${{ env.CONTAINER_IMAGE_NAMES }}
cut-off: A week ago UTC
keep-at-least: 1
account-type: org
org-name: ${{ env.ORG_NAME }}
keep-n-most-recent: 1
account: ${{ env.ORG_NAME }}
# use the GITHUB_TOKEN when issue https://github.com/snok/container-retention-policy/issues/27 is fixed
token: ${{ env.SNOK_TOKEN }}

0 comments on commit 1fe118f

Please sign in to comment.