Skip to content

Commit

Permalink
ci: cut ref into branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
haifeng-li-at-salesforce committed Jun 24, 2024
1 parent a6b3b7d commit 9845e01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:

steps:
- name: Check branch name
run: | # ref format: refs/heads/release-0
ref =${{ github.ref }}
branch_name = "${ref:11}"
run: |
ref ="${{ github.ref }}"
branch_name = ${ref:11}
if [[ ! "$branch_name" =~ ^release-* ]]; then
echo "Error: Workflow can only run on branches starting with 'release-*'"
exit 1
Expand Down

0 comments on commit 9845e01

Please sign in to comment.