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

Split sonarcloud analysis from build workflow #16

Conversation

sebastienvermeille
Copy link
Owner

@sebastienvermeille sebastienvermeille commented May 15, 2023

Changes

There is now two workflows:

  • build.yml (build, test, verify)
  • sonar.yml (perform sonar analysis)

Long story short: This split should allow to run sonar analysis for PR and branches (including forks) without giving access to SONAR_TOKEN secret as it is only executed on master branch (workflow_run)

The idea comes from here: https://community.sonarsource.com/t/how-to-use-sonarcloud-with-a-forked-repository-on-github/7363/32

How was it tested ?

Could not... need to be merged in master first 🤞

Relates to:

@sebastienvermeille sebastienvermeille linked an issue May 15, 2023 that may be closed by this pull request
Build and Test (no longer sonar)
Sonar analysis will now be executed only on master branch for security reasons
@sebastienvermeille sebastienvermeille force-pushed the 14-sonarcloud-analysis-fail-on-external-contributor-prs branch from 8033d53 to 9d2c585 Compare May 16, 2023 06:09
@sebastienvermeille sebastienvermeille self-assigned this May 16, 2023
@sebastienvermeille sebastienvermeille merged commit a4ac205 into master May 16, 2023
@sebastienvermeille sebastienvermeille deleted the 14-sonarcloud-analysis-fail-on-external-contributor-prs branch May 16, 2023 06:16
@sebastienvermeille sebastienvermeille changed the title Attempt Split sonarcloud analysis from build workflow May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sonarcloud analysis fail on external contributor PRs
1 participant