Skip to content

Commit

Permalink
feat(ci): update Docker image tagging strategy
Browse files Browse the repository at this point in the history
- Change Docker image tags to use a consistent format:
  - `latest` tag for the latest commit on the main branch
  - `sha-<sha>` tags for individual commit SHAs
  - `branch-<branch-name>` tags for individual branches
- Sanitize branch names in the tags to ensure valid tag names
  • Loading branch information
rtuszik committed Aug 29, 2024
1 parent 440f38e commit e595e34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest
type=sha,prefix={{branch}}-
type=ref,event=branch
type=sha,prefix=sha-
type=ref,event=branch,pattern={{branch}},prefix=branch-,sanitize=true
- name: Build and push Docker image
uses: docker/build-push-action@v4
Expand Down

0 comments on commit e595e34

Please sign in to comment.