Skip to content

Delete package versions #106

Delete package versions

Delete package versions #106

name: Delete package versions
on:
workflow_run:
workflows: [Create and publish a Docker image]
types: [completed]
branches: [main]
jobs:
delete-versions:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/delete-package-versions@v4
with:
package-name: 'rice-pilaf/app'
package-type: 'container'
min-versions-to-keep: 1
- uses: actions/delete-package-versions@v4
with:
package-name: 'rice-pilaf/workflow'
package-type: 'container'
min-versions-to-keep: 1
on-failure:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo 'The triggering workflow failed'