Skip to content

Commit 2639c64

Browse files
committed
Add tags to workflow_dispatch
Signed-off-by: Aaron Wislang <[email protected]>
1 parent 3512ea6 commit 2639c64

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/publish-devcontainer.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
push:
77
branches: ['latest']
88
workflow_dispatch:
9+
inputs:
10+
tags:
11+
description: 'Tags for the Docker image'
12+
required: true
13+
default: 'latest'
914

1015
# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
1116
env:
@@ -49,7 +54,7 @@ jobs:
4954
context: .
5055
file: .devcontainer/docker/Dockerfile
5156
push: true
52-
tags: ${{ steps.meta.outputs.tags }}
57+
tags: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tags || steps.meta.outputs.tags }}
5358
labels: ${{ steps.meta.outputs.labels }}
5459

5560
# This step generates an artifact attestation for the image, which is an unforgeable statement about where and how it was built. It increases supply chain security for people who consume the image. For more information, see "[AUTOTITLE](/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds)."

0 commit comments

Comments
 (0)