Skip to content

Commit 2d7612a

Browse files
committed
Add version target to manual publish dispatch
This lets you publish old versions with the newer workflow.
1 parent d699dbb commit 2d7612a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Diff for: .github/workflows/publish.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
types:
66
- released
77
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: The version to publish.
11+
type: string
12+
required: true
813

914
permissions:
1015
packages: write # For pushing to ghcr.io.
@@ -17,7 +22,7 @@ jobs:
1722
- uses: robinraju/[email protected]
1823
with:
1924
repository: "coder/code-marketplace"
20-
tag: ${{ github.ref_name }}
25+
tag: ${{ github.event.inputs.version || github.ref_name }}
2126
fileName: "code-marketplace-linux-*"
2227
out-file-path: "bin"
2328

@@ -30,3 +35,5 @@ jobs:
3035
- uses: docker/setup-qemu-action@v2
3136
- uses: docker/setup-buildx-action@v2
3237
- run: docker buildx bake -f ./docker-bake.hcl --push
38+
env:
39+
VERSION: ${{ github.event.inputs.version || github.ref_name }}

Diff for: docker-bake.hcl

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
variable "GITHUB_REF_NAME" {}
1+
variable "VERSION" {}
22

33
group "default" {
44
targets = ["code-marketplace"]
@@ -7,7 +7,7 @@ group "default" {
77
target "code-marketplace" {
88
dockerfile = "./Dockerfile"
99
tags = [
10-
"ghcr.io/coder/code-marketplace:${GITHUB_REF_NAME}",
10+
"ghcr.io/coder/code-marketplace:${VERSION}",
1111
]
1212
platforms = ["linux/amd64", "linux/arm64"]
1313
}

0 commit comments

Comments
 (0)