Add latest version check and update logic for GHCR workflows (#637)

* feat: add latest version check and update logic for GHCR workflows.

* feat: implement latest version checks in GHCR workflows and update related logic.
This commit is contained in:
Miroslav Šedivý
2026-04-10 10:59:40 +02:00
parent 6b561feb90
commit 7584ea2ed8
6 changed files with 98 additions and 5 deletions
+13 -1
View File
@@ -22,6 +22,16 @@ on:
type: string
default: "Dockerfile"
description: "The Dockerfile to use for building the image."
latest:
required: false
type: boolean
default: true
description: "Whether to update the latest tag (set to false for maintenance branches)."
latest_major:
required: false
type: boolean
default: true
description: "Whether to update the major tag (set to false if a newer patch exists in this major)."
env:
FLAVOR_PREFIX: ${{ inputs.flavor && format('{0}-', inputs.flavor) || '' }}
@@ -47,11 +57,13 @@ jobs:
id: meta
with:
images: ghcr.io/${{ github.repository }}/${{ env.FLAVOR_PREFIX }}${{ inputs.name }}
flavor: |
latest=${{ inputs.latest && 'auto' || 'false' }}
tags: |
type=edge,branch=master
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern={{major}},enable=${{ inputs.latest_major }}
type=sha,format=long
- name: Log in to the Container registry