Skip to content

Commit 7537fbb

Browse files
authored
👷 Skip sonar-merge-main workflow if github actor is dependabot (openwallet-foundation#3691)
This is because GitHub Actions does not provide repository secrets (such as SONAR_TOKEN) to workflows triggered by dependabot[bot] for security reasons. As a result, the SonarCloud scan step fails when dependabot merges to main (i.e., using `@dependabot squash and merge`, instead of manually merging oneself). By skipping the scan when the actor is dependabot, we avoid unnecessary workflow failures. Signed-off-by: ff137 <[email protected]>
1 parent 544fcb7 commit 7537fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/sonar-merge-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
sonarcloud:
1313
name: SonarCloud
1414
runs-on: ubuntu-latest
15-
if: github.repository == 'openwallet-foundation/acapy'
15+
if: github.repository == 'openwallet-foundation/acapy' && github.actor != 'dependabot[bot]'
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818
with:

0 commit comments

Comments
 (0)