Skip to content

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

Merged
gkostkowski merged 1 commit into
OP-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 into
OP-TED:developfrom
meaningfy-ws:ci/optional-sonarcloud

Conversation

@twicechild

Copy link
Copy Markdown
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.

@gkostkowskigkostkowski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, thanks.

@twicechild
twicechildforce-pushed the ci/optional-sonarcloud branch from f655dd5 to 1c1b673CompareMarch 5, 2026 10:33
@gkostkowski
gkostkowski merged commit 8f23d40 into OP-TED:developMar 5, 2026
1 check passed
@twicechild
twicechild deleted the ci/optional-sonarcloud branch March 26, 2026 12:50
Sign up for freeto 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

@twicechild@gkostkowski