diff --git a/.github/workflows/on_pr_closed.yaml b/.github/workflows/on_pr_closed.yaml index 64c18620b..1d4f0ee7f 100644 --- a/.github/workflows/on_pr_closed.yaml +++ b/.github/workflows/on_pr_closed.yaml @@ -42,3 +42,17 @@ jobs: continue-on-error: true run: | oc delete secret,pvc --selector "app.kubernetes.io/instance"=pr-${{ github.event.number }}-traction + + clean-ghcr: + runs-on: ubuntu-20.04 + name: Delete closed or stale pr images + steps: + - name: Delete containers + uses: snok/container-retention-policy@v2 + with: + image-names: traction-plugins-acapy, traction-tenant-proxy, traction-tenant-ui + cut-off: One month ago UTC + account-type: org + org-name: ${{ github.repository_owner}} + filter-tags: ${{ github.event.number }} + token: ${{ secrets.PACKAGE_DELETE_TOKEN }} \ No newline at end of file