File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,13 +38,13 @@ steps:
3838 PR_DATA=$(curl -s -H "Authorization: token $$GITHUB_TOKEN" \
3939 "https://api.github.com/repos/$REPO_FULL_NAME/pulls/$_PR_NUMBER")
4040
41- # Extract labels and title from PR data
42- PR_LABELS=$(echo "$PR_DATA" | jq -r '.labels[].name' | paste -sd ',')
43- PR_TITLE=$(echo "$PR_DATA" | jq -r '.title')
41+ # Extract labels and title from PR data (Use $$ to escape bash variables)
42+ PR_LABELS=$(echo "$$ PR_DATA" | jq -r '.labels[].name' | paste -sd ',')
43+ PR_TITLE=$(echo "$$ PR_DATA" | jq -r '.title')
4444
45- # Determine Release Version
46- if [[ '$ PR_LABELS' =~ ' autorelease: triggered' ]]; then
47- if [[ '$ PR_TITLE' =~ release\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
45+ # Determine Release Version (Use double quotes and $$ for bash variables)
46+ if [[ "$$ PR_LABELS" == *" autorelease: triggered"* ]]; then
47+ if [[ "$$ PR_TITLE" =~ release\ ([0-9]+\.[0-9]+\.[0-9]+) ]]; then
4848 export RELEASE_VERSION="$${BASH_REMATCH[1]}"
4949 else
5050 export RELEASE_VERSION="unknown"
You can’t perform that action at this time.
0 commit comments