diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 16c0896..87c8ada 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -9,11 +9,11 @@ on: # schedule: # - cron: '30 20 * * *' push: - branches: [ "dev" ] + branches: [ "*" ] # Publish semver tags as releases. tags: [ 'v*.*.*' ] pull_request: - branches: [ "dev" ] + branches: [ "main","master" ] env: # Use docker.io for Docker Hub if empty @@ -68,6 +68,13 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action