Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: 'CodeQL'
on:
push:
branches: [main]
pull_request:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest I would still run CodeQL for PRs against main, as it will block the PR from being merged if there are CodeQL issues.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably fine to run it on main only, because I don't remember a single time where it failed for a valid reason 😅 We'll still get the notification if it's failed on main and see the results here: https://github.com/getsentry/sentry-java/security/code-scanning

The reason we don't want to run it on PRs because without build-cache it'd be the longest one to run. Alternatively we could skip the run altogether, if there were no code changes to prevent the job from failing, but I think it's a good middle-ground for now.

# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '17 23 * * 3'

Expand Down Expand Up @@ -45,7 +42,7 @@ jobs:

- name: Build Java
run: |
./gradlew buildForCodeQL
./gradlew buildForCodeQL --no-build-cache

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # pin@v2
Loading