mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 08:21:50 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user