Skip to content

Commit

Permalink
fixed branch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich committed Aug 7, 2023
1 parent 1ec5279 commit b8046ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
- uses: actions/checkout@v3.3.0
- name: Validate that action points to main branch
run: |
BRANCH=$(yq '.jobs.review-approvals.steps[0].uses' $FILE_NAME)
echo $BRANCH | cut -d "@" -f2
BRANCH=$(yq '.jobs.review-approvals.steps[0].uses' $FILE_NAME | cut -d "@" -f2)
# If the branch is not the main branch
if [ "$BRANCH" != "$MAIN_BRANCH" ]; then
echo "Action points at $BRANCH. It has to point to $MAIN_BRANCH instead!"
Expand Down

0 comments on commit b8046ee

Please sign in to comment.