From dcaceaddafd012517bc0a7dcbbe43fb6569f1a05 Mon Sep 17 00:00:00 2001 From: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com> Date: Tue, 21 Nov 2023 16:33:02 +0200 Subject: [PATCH] Skip the whole `test` job on pull requests, not just one step --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 896f64f75..ca725e146 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,8 @@ jobs: --configuration Release test: + # Tests need access to secrets, so we can't run them against PRs because of limited trust + if: ${{ github.event_name != 'pull_request' }} runs-on: windows-latest permissions: contents: read @@ -46,8 +48,6 @@ jobs: dotnet-version: 8.0.x - name: Run tests - # Tests need access to secrets, so we can't run them against PRs because of limited trust - if: ${{ github.event_name != 'pull_request' }} env: DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} run: >