Skip to content

Commit

Permalink
feat: test delete images in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloogc committed Oct 30, 2023
1 parent 3ad485e commit cdbb62a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,25 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Delete old images
uses: actions/delete-package-versions@v4
with:
package-type: 'container'
package-name: 'imartinez/privategpt'
min-versions-to-keep: 2
ignore-versions: '^main$'
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit cdbb62a

Please sign in to comment.