File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,10 +168,18 @@ jobs:
168168 runs-on : ubuntu-latest
169169 outputs :
170170 preid : ${{ steps.preid.outputs.preid }}
171+ tag : ${{ steps.tag.outputs.tag }}
171172 steps :
173+ - name : Sanitize tag
174+ id : tag
175+ run : |
176+ RAW_TAG="${{ github.event.inputs.tag }}"
177+ SAFE_TAG="$(echo "$RAW_TAG" | sed 's/[^0-9A-Za-z-]/-/g')"
178+ echo "tag=$SAFE_TAG" >> "$GITHUB_OUTPUT"
179+
172180 - name : Block production tags
173181 run : |
174- if [ "${{ github.event.inputs .tag }}" = "latest" ]; then
182+ if [ "${{ steps.tag.outputs .tag }}" = "latest" ]; then
175183 echo "::error::Publishing with the 'latest' tag is not allowed for candidates. Use 'release' mode instead."
176184 exit 1
177185 fi
@@ -212,6 +220,6 @@ jobs:
212220 js-sdk : ${{ github.event.inputs.js-sdk == 'true' }}
213221 python-sdk : ${{ github.event.inputs.python-sdk == 'true' }}
214222 cli : ${{ github.event.inputs.cli == 'true' }}
215- tag : ${{ github.event.inputs .tag }}
223+ tag : ${{ needs.rc-validate.outputs .tag }}
216224 preid : ${{ needs.rc-validate.outputs.preid }}
217225 secrets : inherit
You can’t perform that action at this time.
0 commit comments