Skip to content

Commit 2f62351

Browse files
authored
Merge pull request #211 from microsoft/dilan/publish-pack-bug-2
Pack Publish Bug
2 parents e669dc6 + ba58c01 commit 2f62351

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/microsoft-codeql-pack-publish.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ on:
55

66
jobs:
77
check-branch:
8-
if: github.ref == 'refs/heads/main'
98
runs-on: ubuntu-latest
109
steps:
11-
- run: echo "This workflow can only run on the 'main' branch." && exit 1
10+
- name: Fail if not on main branch
11+
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
1216
codeqlversion:
1317
needs: check-branch
1418
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)