mirror of
https://github.com/immich-app/devtools.git
synced 2026-09-30 13:23:00 +08:00
chore!: explicit tags input on multi-runner-build (#1902)
This commit is contained in:
@@ -18,10 +18,10 @@ on:
|
|||||||
description: 'Comma-separated list of suffixes to append to the image tag'
|
description: 'Comma-separated list of suffixes to append to the image tag'
|
||||||
type: string
|
type: string
|
||||||
default: ''
|
default: ''
|
||||||
dockerhub-push:
|
tags:
|
||||||
description: 'Push to Docker Hub'
|
description: 'Tag rules for the image, in docker/metadata-action format'
|
||||||
type: boolean
|
type: string
|
||||||
default: false
|
required: true
|
||||||
build-args:
|
build-args:
|
||||||
description: 'Docker build arguments'
|
description: 'Docker build arguments'
|
||||||
type: string
|
type: string
|
||||||
@@ -35,20 +35,11 @@ on:
|
|||||||
target:
|
target:
|
||||||
description: 'Sets the target stage to build'
|
description: 'Sets the target stage to build'
|
||||||
type: string
|
type: string
|
||||||
release-tag-type:
|
|
||||||
description: 'The type of release tag to use, either git-tag or semver'
|
|
||||||
type: string
|
|
||||||
default: 'semver'
|
|
||||||
secrets:
|
secrets:
|
||||||
GITHUB_APP_TOKEN:
|
GITHUB_APP_TOKEN:
|
||||||
required: false
|
required: false
|
||||||
DOCKERHUB_USERNAME:
|
|
||||||
required: false
|
|
||||||
DOCKERHUB_TOKEN:
|
|
||||||
required: false
|
|
||||||
env:
|
env:
|
||||||
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ inputs.image }}
|
GHCR_IMAGE: ghcr.io/${{ github.repository_owner }}/${{ inputs.image }}
|
||||||
DOCKERHUB_IMAGE: altran1502/${{ inputs.image }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -124,13 +115,6 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
github-token: ${{ secrets.GITHUB_APP_TOKEN || github.token }}
|
github-token: ${{ secrets.GITHUB_APP_TOKEN || github.token }}
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
if: ${{ inputs.dockerhub-push }}
|
|
||||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
- name: Login to GHCR
|
||||||
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
|
||||||
with:
|
with:
|
||||||
@@ -150,22 +134,8 @@ jobs:
|
|||||||
flavor: |
|
flavor: |
|
||||||
# Disable latest tag
|
# Disable latest tag
|
||||||
latest=false
|
latest=false
|
||||||
images: |
|
images: ${{ env.GHCR_IMAGE }}
|
||||||
name=${{ env.GHCR_IMAGE }}
|
tags: ${{ inputs.tags }}
|
||||||
name=${{ env.DOCKERHUB_IMAGE }},enable=${{ inputs.dockerhub-push }}
|
|
||||||
tags: |
|
|
||||||
# Tag with branch name
|
|
||||||
type=ref,event=branch
|
|
||||||
# Tag with pr-number
|
|
||||||
type=ref,event=pr
|
|
||||||
# Tag with long commit sha hash
|
|
||||||
type=sha,format=long,prefix=commit-
|
|
||||||
# Release version tags
|
|
||||||
type=semver,pattern={{version}},prefix=v,enable=${{ inputs.release-tag-type == 'semver' }}
|
|
||||||
type=semver,pattern={{major}},prefix=v,enable=${{ inputs.release-tag-type == 'semver' }}
|
|
||||||
type=match,pattern=v(\d+),group=1,prefix=v,suffix=-rc,enable=${{ inputs.release-tag-type == 'semver' && github.event.release.prerelease == true }}
|
|
||||||
type=ref,event=tag,enable=${{ inputs.release-tag-type == 'git-tag' }}
|
|
||||||
type=raw,value=release,enable=${{ github.event_name == 'release' && github.event.release.prerelease == false }}
|
|
||||||
|
|
||||||
- name: Create manifest list and push
|
- name: Create manifest list and push
|
||||||
working-directory: ${{ runner.temp }}/digests
|
working-directory: ${{ runner.temp }}/digests
|
||||||
|
|||||||
Reference in New Issue
Block a user