chore(release): v2.0.0 - [CU-869b8rv0u] #21
This file contains hidden or 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: Main Branch Protection | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| branches: [main] | |
| jobs: | |
| validate-merge-permissions: | |
| runs-on: ubuntu-latest | |
| name: Validate Merge Permissions | |
| steps: | |
| - name: Verify Authorized User | |
| run: | | |
| TARGET_BRANCH="${{ github.event.pull_request.base.ref }}" | |
| PR_AUTHOR="${{ github.actor }}" | |
| ALLOWED_USER="AhmedSobhy01" | |
| if [ "$PR_AUTHOR" != "$ALLOWED_USER" ] && [ "$TARGET_BRANCH" = "main" ]; then | |
| echo "Unauthorized PR to main by $PR_AUTHOR, only $ALLOWED_USER is allowed." | |
| exit 1 | |
| fi | |
| echo "Authorized PR to main branch." |