Skip to content

Commit

Permalink
Do not push on new semver only
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrián Parilli committed Nov 23, 2024
1 parent 3268440 commit 30af4b6
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
push:
branches: [ "master" ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
#tags: [ 'v*.*.*' ]
pull_request:
branches: [ "master" ]

Expand Down Expand Up @@ -67,13 +67,12 @@ jobs:
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
# Set 'latest' and semver tags
tags: |
# set latest tag for master branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
# set version tag from semver
type=semver,pattern={{major}},enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=semver,pattern={{major}}.{{minor}},enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=semver,pattern={{major}}.{{minor}}.{{patch}},enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=latest
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down

0 comments on commit 30af4b6

Please sign in to comment.