feat: update branch patterns in workflow files for better versioning … #46
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: Restrict PRs to Main | |
on: | |
pull_request: | |
branches: | |
- '[0-9]+x' | |
jobs: | |
check-source-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate source branch | |
run: | | |
SOURCE_BRANCH="${{ github.head_ref }}" | |
if [[ ! "$SOURCE_BRANCH" =~ ^(feature|hotfix|bugfix)/.* ]]; then | |
echo "❌ ERRO: PRs para 'main' só podem vir de 'feature/*' ou 'hotfix/*' ou 'bugfix/*'." | |
exit 1 | |
fi |