Skip to content

Commit a9fa8f2

Browse files
authored
ci: Use DEPENDABOT_AUTH for dependabot-triggered Sonar scans (#119)
[skip ci]
1 parent 5688e8d commit a9fa8f2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/pull_request.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@ jobs:
3535
sonar-host: https://sonarcloud.io
3636
sonar-scanner: maven
3737
main-branch: master
38-
service-account-key: ${{ secrets.SECRET_AUTH }}
38+
# Dependabot-triggered runs read the Dependabot secret store, where
39+
# SECRET_AUTH does not exist. Fall back to the Dependabot-scoped key
40+
# for those runs only.
41+
service-account-key: ${{ github.actor == 'dependabot[bot]' && secrets.DEPENDABOT_AUTH || secrets.SECRET_AUTH }}

0 commit comments

Comments
 (0)