Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CodeQL workflow #1757

Merged
merged 2 commits into from
Oct 30, 2024
Merged

Update CodeQL workflow #1757

merged 2 commits into from
Oct 30, 2024

Conversation

Zerpet
Copy link
Collaborator

@Zerpet Zerpet commented Oct 29, 2024

Summary Of Changes

Dependabot does not have write permissions in the repository, and it
causes failures when running on push events, because CodeQL needs write
access to upload the results of the scaning to GitHub.

This commit adds a conditional to run CodeQL if the event is a pull
request, OR if the actor is not dependabot. This conditional should
filter "push" events when dependabot is the actor, and always run pull
request scans.

Additional Context

Following guidance from this useful error message:

https://github.com/rabbitmq/cluster-operator/actions/runs/11572316735/job/32212033650#step:6:56

Dependabot does not have write permissions in the repository, and it
causes failures when running on push events, because CodeQL needs write
access to upload the results of the scaning to GitHub.

This commit adds a conditional to run CodeQL if the event is a pull
request, OR if the actor is not dependabot. This conditional should
filter "push" events when dependabot is the actor, and always run pull
request scans.
@Zerpet Zerpet merged commit fe8c115 into main Oct 30, 2024
13 checks passed
@Zerpet Zerpet deleted the update-dependabot branch October 30, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants