Skip to content

feat: update branch patterns in workflow files for better versioning … #46

feat: update branch patterns in workflow files for better versioning …

feat: update branch patterns in workflow files for better versioning … #46

Workflow file for this run

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