Skip to content

Commit d31ba97

Browse files
committed
chore: add workflow dispatch to run on a specific version
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
1 parent 6ab6ebc commit d31ba97

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎.github/workflows/winget.yml‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: winget
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version'
10+
required: true
611

712
env:
813
WINGET_CREATE_GITHUB_TOKEN: ${{ secrets.WINGET_TOKEN }}
@@ -12,15 +17,15 @@ jobs:
1217
runs-on: windows-latest
1318
steps:
1419
- name: publish
20+
env:
21+
RELEASE: ${{ toJSON(github.event.release) }}
22+
VERSION: ${{ github.event.inputs.version }}
1523
run: |
16-
$Release = $ENV:RELEASE | ConvertFrom-Json
17-
$Version = $Release.tag_name
24+
$Version = $ENV:VERSION
1825
$PackageId = "Docker.Cagent"
1926
$Urls = @(
2027
"https://github.com/docker/cagent/releases/download/$Version/cagent-windows-amd64.exe|amd64",
2128
"https://github.com/docker/cagent/releases/download/$Version/cagent-windows-arm64.exe|arm64"
2229
)
2330
& curl.exe -JLO https://aka.ms/wingetcreate/latest
2431
& .\wingetcreate.exe update $PackageId -s -v $Version -u $Urls
25-
env:
26-
RELEASE: ${{ toJSON(github.event.release) }}

0 commit comments

Comments
 (0)