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

v1.11 ci: set PR base for codeql workflow #18368

Merged
merged 2 commits into from
Jan 6, 2022
Merged

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Jan 4, 2022

Manual backport of #18283 with adjusted branch name.

This makes sure only code changed by the CL is flagged by CodeQL,
but not existing issues in the repo.

Moreover, run the paths-filter action only on pull_request events. This
should fix scheduled run of the workflow.

This fixes the following reported issue [1]:

    1 issue was detected with this workflow: Please make sure that every
    branch in on.pull_request is also in on.push so that Code Scanning
    can compare pull requests against the state of the base branch.

[1] https://github.com/cilium/cilium/actions/runs/1591471691

Note that each release branch and master have their own version of this
workflow and on.{pull_request,push}.branches needs to be changed
accordingly.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
This fixes the following error on scheduled runs:

    This action requires 'base' input to be configured or 'repository.default_branch' to be set in the event payload"

This also makes sure only code changed by the CL is flagged by CodeQL,
but not existing issues in the repo.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser added area/CI Continuous Integration testing issue or flake kind/backports This PR provides functionality previously merged into master. release-note/ci This PR makes changes to the CI. backport/1.11 This PR represents a backport for Cilium 1.11.x of a PR that was merged to main. labels Jan 4, 2022
@tklauser tklauser requested review from a team as code owners January 4, 2022 12:24
@tklauser tklauser requested a review from aanm January 4, 2022 12:24
@tklauser tklauser added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 6, 2022
@pchaigno pchaigno merged commit c681971 into v1.11 Jan 6, 2022
@pchaigno pchaigno deleted the pr/tklauser/v1.11-codeql-fix branch January 6, 2022 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake backport/1.11 This PR represents a backport for Cilium 1.11.x of a PR that was merged to main. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants