ci: GitHub Actions cost optimization #2
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: Enforce Release Source Branch | |
| on: | |
| pull_request: | |
| branches: [Release] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| check-source-branch: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Verify PR comes from Development | |
| run: | | |
| if [ "${{ github.head_ref }}" != "Development" ]; then | |
| echo "::error::PRs to Release must come from Development. Source branch: ${{ github.head_ref }}" | |
| exit 1 | |
| fi | |
| echo "Source branch is Development. OK." |