From 633ac3736176ac55dedd6fb599f6edee124ca5e5 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sat, 28 Nov 2026 19:18:48 -0600 Subject: [PATCH] bypass steps requiring secrets for dependabot --- .github/workflows/build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01c056e84..b70ad0d7c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,8 +26,11 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.version.outputs.version }} + env: + DEPENDABOT: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} steps: - name: Check required secrets + if: env.DEPENDABOT != 'true' env: TOKEN_SONARCLOUD: ${{ secrets.TOKEN_SONARCLOUD }} TOKEN_CODECOV_SOULSEEKNET: ${{ secrets.TOKEN_CODECOV_SOULSEEKNET }} @@ -70,17 +73,17 @@ jobs: echo "version=${version}" >> "$GITHUB_OUTPUT" - uses: actions/setup-java@v4 # required by sonarscanner - if: github.event_name != 'release' + if: github.event_name != 'release' && env.DEPENDABOT != 'true' with: distribution: temurin java-version: '17' - name: Install dotnet-sonarscanner - if: github.event_name != 'release' + if: github.event_name != 'release' && env.DEPENDABOT != 'true' run: dotnet tool install --global dotnet-sonarscanner --version 11.2.1 - name: Begin Sonar analysis - if: github.event_name != 'release' + if: github.event_name != 'release' && env.DEPENDABOT != 'true' env: TOKEN_SONARCLOUD: ${{ secrets.TOKEN_SONARCLOUD }} run: | @@ -133,7 +136,7 @@ jobs: exit 1 - name: End Sonar analysis - if: github.event_name != 'release' + if: github.event_name != 'release' && env.DEPENDABOT != 'true' env: TOKEN_SONARCLOUD: ${{ secrets.TOKEN_SONARCLOUD }} run: | @@ -141,6 +144,7 @@ jobs: dotnet-sonarscanner end /d:sonar.token="${TOKEN_SONARCLOUD}" - name: Upload coverage to Codecov + if: env.DEPENDABOT != 'true' uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # 7.0.0 with: token: ${{ secrets.TOKEN_CODECOV_SOULSEEKNET }}