Updated workflow

This commit is contained in:
2026-04-22 16:50:34 +01:00
parent 4b322dfbfb
commit 2d3fa43657
+11 -4
View File
@@ -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 <account>/<repo>
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