Skip to content

ci(sonarcloud): make SonarCloud scan conditional on SONAR_TOKEN#5

Merged
gkostkowski merged 1 commit intoOP-TED:developfrom
meaningfy-ws:ci/optional-sonarcloud
Mar 5, 2026
Merged

ci(sonarcloud): make SonarCloud scan conditional on SONAR_TOKEN#5
gkostkowski merged 1 commit intoOP-TED:developfrom
meaningfy-ws:ci/optional-sonarcloud

Conversation

@twicechild
Copy link
Contributor

Summary

  • Makes the SonarCloud scan step optional by guarding it with env.SONAR_TOKEN != ''
  • Hoists SONAR_TOKEN from step-level to job-level env so it can be tested in if: conditions (GitHub Actions does not allow secrets.* in if: expressions)
  • When the secret is not configured (e.g. in forks), the step is cleanly skipped instead of failing

This follows the same pattern used in entity-resolution-spec.

Copy link
Contributor

@gkostkowski gkostkowski left a comment

Choose a reason for hiding this comment

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

Looks good, thanks.

@twicechild twicechild force-pushed the ci/optional-sonarcloud branch from f655dd5 to 1c1b673 Compare March 5, 2026 10:33
@gkostkowski gkostkowski merged commit 8f23d40 into OP-TED:develop Mar 5, 2026
1 check passed
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