diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1f6b6f4..fae0c65 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -6,14 +6,15 @@ name: Docker # documentation. on: + workflow_dispatch: # Allows the workflow to be triggered manually from the UI schedule: - cron: '33 5 * * *' push: - branches: [ "main" ] + branches: ["main"] # Publish semver tags as releases. - tags: [ 'v*.*.*' ] + tags: ['v*.*.*'] pull_request: - branches: [ "main" ] + branches: ["main"] env: # Use docker.io for Docker Hub if empty @@ -21,7 +22,6 @@ env: # github.repository as / IMAGE_NAME: ${{ github.repository }} - jobs: build: @@ -68,6 +68,13 @@ jobs: uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=raw,value=latest,enable={{is_default_branch}} # Auto-tags 'latest' on main branch builds # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action