File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 11name : publish_yak
22
3- on : workflow_dispatch
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ environment :
7+ description : " Choose deployment environment"
8+ required : true
9+ type : choice
10+ options :
11+ - test
12+ - prod
413
514jobs :
615
918
1019 steps :
1120
21+ - name : Set test flag based on input
22+ shell : pwsh
23+ run : |
24+ if ("${{ github.event.inputs.environment }}" -eq "test") {
25+ echo "TEST_FLAG=--test-server" | Out-File -FilePath $env:GITHUB_ENV -Append
26+ }
27+ else {
28+ echo "TEST_FLAG=" | Out-File -FilePath $env:GITHUB_ENV -Append
29+ }
30+
1231 - name : Checkout repo
1332 uses : actions/checkout@v4
1433
5574 shell : pwsh
5675 run : |
5776 $file = Get-ChildItem -Path dist\yak_package\*rh8*.yak -File | Select-Object -ExpandProperty Name
58- invoke publish-yak --test-server -y dist\yak_package\$file
77+ invoke publish-yak $Env:TEST_FLAG -y dist\yak_package\$file
5978 env :
6079 YAK_TOKEN : ${{ secrets.YAK_DF_TOKEN }}
You can’t perform that action at this time.
0 commit comments