Skip to content

Commit b83efdd

Browse files
authored
fix(publish_release): allow ci workflow to push to main (#61)
1 parent acdfd73 commit b83efdd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.husky/pre-push

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Skip hook in CI environment (GitHub Actions)
2+
# Pushing to main is forbidden by branch protection rules, only the release workflow can do this.
3+
if [ -n "$CI" ]; then
4+
exit 0
5+
fi
6+
17
branch_name="$(git symbolic-ref --short HEAD)"
28
if [ "$branch_name" = "main" ]; then
39
echo "Pushing directly to main is not allowed."

0 commit comments

Comments
 (0)