Skip to content

Commit 81b6b71

Browse files
authored
Merge pull request #29 from IShix-g/release
fix: correct branch comparison logic in workflow
2 parents 19cee4d + 785d42f commit 81b6b71

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/toc-generator_push.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222
fi
2323
2424
default_branch="${{ github.event.repository.default_branch }}"
25-
26-
if [[ "$target_branch" != "$default_branch" ]]; then
25+
26+
if [[ "$target_branch" == "$default_branch" ]]; then
27+
echo "::notice::Branch check passed."
28+
echo "passed=1" >> "$GITHUB_OUTPUT"
29+
else
2730
echo "::notice::This is not the default branch. ($default_branch)"
2831
echo "Target branch: $target_branch"
2932
echo "Default branch: $default_branch"
30-
echo "passed=1" >> "$GITHUB_OUTPUT"
31-
else
32-
echo "::notice::Branch check passed."
3333
fi
3434
3535
validate-commit-message:

0 commit comments

Comments
 (0)