From 906e9eda9abb1c689aedff51bf0c6296a5b9b275 Mon Sep 17 00:00:00 2001 From: Lukas Saltenas Date: Tue, 28 Oct 2025 17:01:22 +0200 Subject: [PATCH] fix(publish_release): allow ci workflow to push to main --- .husky/pre-push | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.husky/pre-push b/.husky/pre-push index 860b9f6..2382e7d 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,3 +1,9 @@ +# Skip hook in CI environment (GitHub Actions) +# Pushing to main is forbidden by branch protection rules, only the release workflow can do this. +if [ -n "$CI" ]; then + exit 0 +fi + branch_name="$(git symbolic-ref --short HEAD)" if [ "$branch_name" = "main" ]; then echo "Pushing directly to main is not allowed."