chore: Advanced Example (Custom Workflow using ImpReader class) #1
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: Main - 🧐 Check PR Source Branch | |
on: | |
pull_request_target: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
check-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Display Source Branch | |
run: | | |
echo "Pull request is coming from branch: ${{ github.head_ref }}" | |
- name: Fail if source branch is not allowed | |
if: ${{ github.head_ref != 'dev' }} | |
run: | | |
echo "Error: Pull requests are only allowed from the 'dev' branch." | |
exit 1 |