mirror of https://github.com/theNewDynamic/gohugo-theme-ananke.git

Patrick Kollitsch
14.55.2026 d911f7493fab7bce5487514588f5c11abd1930b3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
name: Validate main branch source
 
on:
  pull_request:
    branches:
      - main
 
permissions:
  contents: read
  pull-requests: read
 
jobs:
  validate-source-branch:
    name: Require development as source branch
    runs-on: ubuntu-latest
 
    steps:
      - name: Validate source branch
        env:
          HEAD_REF: ${{ github.head_ref }}
        run: |
          if [ "${HEAD_REF}" != "development" ]; then
            echo "::error::Pull requests into main must come from development. Current source branch: ${HEAD_REF}"
            exit 1
          fi