Skip to content

Commit 3499836

Browse files
committed
Fix publish yaml
1 parent b22cc58 commit 3499836

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/workflows/publish.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# See. https://docs.docker.com/build/ci/github-actions/multi-platform/
22
name: Publish Docker Image
3+
run-name: ${{ github.workflow }} (${{ inputs.version || 'latest only' }})
34

45
on:
56
workflow_dispatch:
@@ -26,12 +27,19 @@ jobs:
2627
- name: Set up Docker Buildx
2728
uses: docker/setup-buildx-action@v3
2829

30+
- name: Prepare tags
31+
id: prepare_tags
32+
run: |
33+
if [ -z "${{ inputs.version }}" ]; then
34+
echo "TAGS=daido1976/aws-lambda-function-url-emulator:latest" >> $GITHUB_ENV
35+
else
36+
echo "TAGS=daido1976/aws-lambda-function-url-emulator:latest,daido1976/aws-lambda-function-url-emulator:${{ inputs.version }}" >> $GITHUB_ENV
37+
fi
38+
2939
- name: Build and Push Docker Image
3040
uses: docker/build-push-action@v6
3141
with:
3242
context: .
3343
platforms: linux/amd64,linux/arm64
3444
push: true
35-
tags: |
36-
daido1976/aws-lambda-function-url-emulator:latest
37-
${{ github.event.inputs.version && 'daido1976/aws-lambda-function-url-emulator:${{ github.event.inputs.version }}' }}
45+
tags: ${{ env.TAGS }}

0 commit comments

Comments
 (0)