Skip to content

Commit

Permalink
chore: Update push-to-registry.yaml with tag patterns for branch and …
Browse files Browse the repository at this point in the history
…semver versions
  • Loading branch information
httpdss committed Jul 16, 2024
1 parent 1322fd3 commit 53f8769
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/push-to-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: push-to-registry
on:
push:
branches: ['main']
tags: ['v*']

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -33,13 +34,17 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v5
with:
context: .
push: true
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down

0 comments on commit 53f8769

Please sign in to comment.