Skip to content

clean-testing-package #22

clean-testing-package

clean-testing-package #22

# This workflow runs daily to clean up the `*-testing` images older than the
# cut-off period specified in `snok/container-retention-policy`
name: clean-testing-package
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
clean-ghcr:
name: delete old testing container images
runs-on: ubuntu-latest
steps:
# 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 cloudnative-pg
uses: snok/container-retention-policy@v2
with:
image-names: cloudnative-pg-testing
cut-off: 5 days ago UTC
keep-at-least: 1
account-type: org
org-name: cloudnative-pg
# use the GITHUB_TOKEN when issue https://github.com/snok/container-retention-policy/issues/27 is fixed
token: ${{ secrets.REPO_GHA_PAT }}
- name: Delete '-testing' images for containers
uses: snok/container-retention-policy@v2
with:
image-names: pgbouncer-testing, postgresql-testing, postgis-testing
cut-off: A week ago UTC
keep-at-least: 1
account-type: org
org-name: cloudnative-pg
# use the GITHUB_TOKEN when issue https://github.com/snok/container-retention-policy/issues/27 is fixed
token: ${{ secrets.REPO_GHA_PAT }}