Skip to content

Commit e9f97a7

Browse files
committed
refactor: move registry_image to inputs
Signed-off-by: Yukai Huang <[email protected]>
1 parent 215f022 commit e9f97a7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/push-image.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ on:
1313
description: 'Buildpack image'
1414
required: true
1515
default: 'hackmdio/buildpack:16.20.2-35fe7e39'
16-
17-
env:
18-
REGISTRY_IMAGE: hackmdio/hackmd
16+
registry_image:
17+
description: 'image name'
18+
required: false
19+
default: 'hackmdio/hackmd'
1920

2021
jobs:
2122
build-amd64:
@@ -24,7 +25,7 @@ jobs:
2425
with:
2526
platform: linux/amd64
2627
platform_pair: linux_amd64
27-
registry_image: ${{ env.REGISTRY_IMAGE }}
28+
registry_image: ${{ github.event.inputs.registry_image }}
2829
runtime: ${{ github.event.inputs.runtime }}
2930
buildpack: ${{ github.event.inputs.buildpack }}
3031
runs_on: ubuntu-latest
@@ -35,7 +36,7 @@ jobs:
3536
with:
3637
platform: linux/arm64
3738
platform_pair: linux_arm64
38-
registry_image: ${{ env.REGISTRY_IMAGE }}
39+
registry_image: ${{ github.event.inputs.registry_image }}
3940
runtime: ${{ github.event.inputs.runtime }}
4041
buildpack: ${{ github.event.inputs.buildpack }}
4142
runs_on: macos-latest
@@ -61,7 +62,7 @@ jobs:
6162
id: meta
6263
uses: docker/metadata-action@v5
6364
with:
64-
images: ${{ env.REGISTRY_IMAGE }}
65+
images: ${{ github.event.inputs.registry_image }}
6566
tags: |
6667
type=match,pattern=\d.\d.\d
6768
type=sha,prefix=
@@ -76,8 +77,8 @@ jobs:
7677
working-directory: /tmp/digests
7778
run: |
7879
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
79-
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
80+
$(printf '${{ github.event.inputs.registry_image }}@sha256:%s ' *)
8081
-
8182
name: Inspect image
8283
run: |
83-
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
84+
docker buildx imagetools inspect ${{ github.event.inputs.registry_image }}:${{ steps.meta.outputs.version }}

0 commit comments

Comments
 (0)