Skip to content

clean-testing-package #860

clean-testing-package

clean-testing-package #860

# 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 * * *'
env:
IMAGE_NAME: "cloudnative-pg-testing"
CONTAINER_IMAGE_NAMES: "pgbouncer-testing, postgresql-testing, postgis-testing"
jobs:
clean-ghcr:
name: delete old testing container images
runs-on: ubuntu-latest
steps:
- name: Delete '-testing' operator images in ${{ env.IMAGE_NAME }}
uses: snok/[email protected]
with:
image-names: ${{ env.IMAGE_NAME }}
cut-off: 5d
keep-n-most-recent: 1
account: ${{ github.repository_owner }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Delete '-testing' operand images
uses: snok/[email protected]
if: ${{ github.repository_owner == 'cloudnative-pg' }}
with:
image-names: ${{ env.CONTAINER_IMAGE_NAMES }}
cut-off: 1w
keep-n-most-recent: 1
account: "cloudnative-pg"
token: ${{ secrets.REPO_GHA_PAT }}