Update docker-publish.yml

This commit is contained in:
sstidl 2023-11-04 23:44:07 +01:00 committed by GitHub
parent cecf591d0f
commit 6c92ed8091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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