๐ fix: cssํด๋์ค ์ญ์ ํ ๋๊ฐ์ ์ด๋ฆ์ผ๋ก ์์ฑ ํ css ๋ถ์ฌ ์ ์๋ฌ ๋ฐ์ํ๋ ๋ฒ๊ทธ ์์ #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Branch Name and Prevent Main Merge | |
on: | |
pull_request: | |
branches: | |
- dev | |
- main | |
jobs: | |
check-branch-name: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.base.ref == 'dev' | |
steps: | |
- name: Extract Source Branch Name | |
run: | | |
branch_name=$(jq -r .pull_request.head.ref "$GITHUB_EVENT_PATH") | |
echo "Source Branch: $branch_name" | |
if [[ ! $branch_name =~ ^(feat/[0-9]+|bug/[0-9]+|refactor/[0-9]+|hotfix_[0-9]{4}|chore_[0-9]{4}|gh-pages)$ ]]; then | |
echo "Error: Branch name must follow the pattern 'feat/[number]', 'bug/[number]', 'hotfix_mmdd', 'chore_mmdd', or 'gh-pages'." | |
exit 1 | |
fi | |
prevent-main-merge: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.base.ref == 'main' | |
steps: | |
- name: Prevent Merge to Main | |
run: | | |
base_branch=$(jq -r .pull_request.base.ref "$GITHUB_EVENT_PATH") | |
echo "Base Branch: $base_branch" | |
if [[ $base_branch == "main" ]]; then | |
echo "Error: Pull requests to the main branch are not allowed." | |
exit 1 | |
fi |