Delete package versions #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |