File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
.github/actions/build-proxies Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change 88 releaseVersion :
99 description : " Release, tag, branch, or commit ID to be used for deployment"
1010 required : true
11+ isRelease :
12+ description : " True if releaseVersion is a release tag (if set, downloads from release assets instead of workflow artifacts)"
13+ required : false
14+ default : false
1115 environment :
1216 description : " Deployment environment"
1317 required : true
@@ -30,12 +34,30 @@ runs:
3034 using : composite
3135
3236 steps :
33- - name : Download OAS Spec artifact
37+ - name : Download OAS Spec artifact from workflow
38+ if : ${{ inputs.isRelease == 'false' }}
3439 uses : actions/download-artifact@v4
3540 with :
3641 name : api-oas-specification-${{ inputs.apimEnv }}${{ inputs.version != '' && format('-{0}', inputs.version) || '' }}
3742 path : ./build
3843
44+ - name : Download OAS Spec artifact from release
45+ if : ${{ inputs.isRelease == 'true' }}
46+ shell : bash
47+ run : |
48+ mkdir -p ./build
49+ ASSET_PATTERN="api-oas-specification-${{ inputs.apimEnv }}-*.zip"
50+ echo "Downloading assets matching $ASSET_PATTERN from release ${{ inputs.release }}"
51+ gh release download "${{ inputs.release }}" \
52+ --pattern "$ASSET_PATTERN" \
53+ --dir ./build
54+ # Unzip the downloaded file (there should be exactly one match)
55+ ASSET_FILE=$(ls ./build/api-oas-specification-${{ inputs.apimEnv }}-*.zip)
56+ unzip -o "$ASSET_FILE" -d ./build
57+ rm "$ASSET_FILE"
58+ env :
59+ GH_TOKEN : ${{ github.token }}
60+
3961 - name : Setup Proxy Name and target
4062 shell : bash
4163 run : |
You can’t perform that action at this time.
0 commit comments