Skip to content

Commit

Permalink
Add build-deploy step to delete older images
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelpnelson committed Nov 12, 2024
1 parent e198274 commit b4484c7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build-deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
DOCKER_REGISTRY: 'ghcr.io'

- name: deploying dev
- name: Deploying dev
uses: bcgov/smk-actions/smk-deploy@main
id: deploySMKContainer
if: env.OPENSHIFT_SERVER_URL != '' && env.OPENSHIFT_TOKEN_DEV != '' && env.GHCR_USER != '' && env.GHCR_TOKEN != ''
Expand All @@ -70,3 +70,11 @@ jobs:
DOCKER_REGISTRY: 'ghcr.io'
PR_REVIEWERS: '["michaelpnelson"]'
PR_MENTIONS: '["michaelpnelson"]'

- name: Deleting older images
uses: actions/delete-package-versions@v5
with:
package-name: 'smk-mrdt/smk-mrdt'
package-type: 'container'
token: ${{ secrets.GHCR_TOKEN }}
min-versions-to-keep: 10

0 comments on commit b4484c7

Please sign in to comment.