We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3945f18 commit 58a59f2Copy full SHA for 58a59f2
1 file changed
.github/workflows/create-release-branch.yml
@@ -26,6 +26,16 @@ jobs:
26
name: Validate permissions
27
runs-on: ubuntu-latest
28
steps:
29
+ - name: Check default branch
30
+ env:
31
+ REF: ${{ github.ref_name }}
32
+ DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
33
+ run: |
34
+ if [ "$REF" != "$DEFAULT_BRANCH" ]; then
35
+ echo "::error::This workflow can only be run from the default branch (${DEFAULT_BRANCH}), but was triggered from '${REF}'."
36
+ exit 1
37
+ fi
38
+
39
- name: Check admin permission
40
env:
41
GH_TOKEN: ${{ github.token }}
0 commit comments