Harden all clipboard paths against a busy Windows clipboard #434
Workflow file for this run
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: Check pull request target branch | |
| on: | |
| pull_request_target: | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - edited | |
| # pull_request_target runs with the base repo's token — this job needs none of it. | |
| permissions: {} | |
| jobs: | |
| check-branches: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check branches | |
| env: | |
| HEAD_REF: ${{ github.head_ref }} | |
| BASE_REF: ${{ github.base_ref }} | |
| run: | | |
| if [ "$HEAD_REF" != "dev" ] && [ "$BASE_REF" == "main" ]; then | |
| echo "::error::Pull requests to main are only allowed from dev. Please target the dev branch instead." | |
| exit 1 | |
| fi |