feat: add more image tag

This commit is contained in:
engigu
2026-02-06 21:52:28 +08:00
parent 60d6fb2525
commit b3a6432742
5 changed files with 108 additions and 23 deletions
+19 -5
View File
@@ -12,6 +12,19 @@ env:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
base_type: [debian, alpine, debian13]
include:
- base_type: debian
base_tag: base
tag_suffix: ""
- base_type: alpine
base_tag: base-alpine
tag_suffix: "-alpine"
- base_type: debian13
base_tag: base-debian13
tag_suffix: "-debian13"
permissions:
contents: read
@@ -38,9 +51,9 @@ jobs:
images: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}-amd64
type=raw,value=latest-amd64,enable={{is_default_branch}}
type=ref,event=branch,suffix=-amd64
type=semver,pattern={{version}}-amd64${{ matrix.tag_suffix }}
type=raw,value=latest-amd64${{ matrix.tag_suffix }},enable={{is_default_branch}}
type=ref,event=branch,suffix=-amd64${{ matrix.tag_suffix }}
- name: Get build time
id: build_time
@@ -58,6 +71,7 @@ jobs:
build-args: |
VERSION=${{ github.ref_name }}
BUILD_TIME=${{ steps.build_time.outputs.time }}
cache-from: type=gha,scope=linux-amd64
cache-to: type=gha,scope=linux-amd64,mode=max
BASE_TAG=${{ matrix.base_tag }}
cache-from: type=gha,scope=linux-amd64-${{ matrix.base_type }}
cache-to: type=gha,scope=linux-amd64-${{ matrix.base_type }},mode=max
provenance: false