We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec87a93 commit 551adbaCopy full SHA for 551adba
1 file changed
.github/workflows/compile-queries.yml
@@ -18,12 +18,20 @@ jobs:
18
fetch-depth: 0
19
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
20
- name: Calculate merge-base
21
+ if: ${{ github.event_name == 'pull_request' }}
22
id: merge-base
23
env:
24
BASE_BRANCH: ${{ github.base_ref }}
25
run: |
26
MERGE_BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
27
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
28
+ - name: Calculate merge-base - main
29
+ if: ${{ github.event_name != 'pull_request' }}
30
+ # using github.sha instead, since we're on main
31
+ id: merge-base
32
+ run: |
33
+ MERGE_BASE=${{ github.sha }})
34
+ echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
35
- name: Cache CodeQL query compilation
36
uses: actions/cache@v3
37
with:
0 commit comments