Skip to content

Commit

Permalink
Update branch check in publish-java.yml to only allow releases from t…
Browse files Browse the repository at this point in the history
…he 'main' branch
  • Loading branch information
michalchecinski committed Sep 26, 2024
1 parent ef38e7a commit 59a844e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
- name: Branch check
if: ${{ inputs.release_type != 'Dry Run' }}
run: |
if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then
if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then
echo "==================================="
echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches"
echo "[!] Can only release from the 'main' branch"
echo "==================================="
exit 1
fi
Expand Down

0 comments on commit 59a844e

Please sign in to comment.