We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e669dc6 commit ba58c01Copy full SHA for ba58c01
.github/workflows/microsoft-codeql-pack-publish.yml
@@ -5,10 +5,14 @@ on:
5
6
jobs:
7
check-branch:
8
- if: github.ref == 'refs/heads/main'
9
runs-on: ubuntu-latest
10
steps:
11
- - run: echo "This workflow can only run on the 'main' branch." && exit 1
+ - name: Fail if not on main branch
+ run: |
12
+ if [ "$GITHUB_REF" != "refs/heads/main" ]; then
13
+ echo "This workflow can only run on the 'main' branch."
14
+ exit 1
15
+ fi
16
codeqlversion:
17
needs: check-branch
18
0 commit comments