Skip to content

Commit 339a95d

Browse files
committed
ci: sanitize preid in release candidates workflow
1 parent 295f3bd commit 339a95d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/release_candidates.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ jobs:
4747
IS_CLI: ${{ contains(github.event.pull_request.labels.*.name, 'cli-rc') || (github.event_name == 'workflow_dispatch' && github.event.inputs.cli == 'true') }}
4848
IS_PYTHON: ${{ contains(github.event.pull_request.labels.*.name, 'python-rc') || (github.event_name == 'workflow_dispatch' && github.event.inputs.python-sdk == 'true') }}
4949
PUBLISH_TAG: ${{ github.event.inputs.tag || 'rc' }}
50-
PREID: ${{ github.event.inputs.preid || github.head_ref || github.ref_name }}
5150

5251
steps:
52+
- name: Sanitize preid
53+
run: |
54+
RAW_PREID="${{ github.event.inputs.preid || github.head_ref || github.ref_name }}"
55+
echo "PREID=$(echo "$RAW_PREID" | sed 's/[^0-9A-Za-z-]/-/g')" >> "$GITHUB_ENV"
56+
5357
- name: Block production tags
5458
if: ${{ github.event_name == 'workflow_dispatch' }}
5559
run: |

0 commit comments

Comments
 (0)