We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec87a93 commit ca20c95Copy full SHA for ca20c95
1 file changed
.github/workflows/compile-queries.yml
@@ -18,12 +18,18 @@ 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
- id: merge-base
+ if: ${{ github.event_name == 'pull_request' }}
22
env:
23
BASE_BRANCH: ${{ github.base_ref }}
24
run: |
25
MERGE_BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
26
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
27
+ - name: Calculate merge-base - main
28
+ if: ${{ github.event_name != 'pull_request' }}
29
+ # using github.sha instead, since we're on main
30
+ run: |
31
+ MERGE_BASE=${{ github.sha }})
32
+ echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
33
- name: Cache CodeQL query compilation
34
uses: actions/cache@v3
35
with:
0 commit comments