diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 46065fdbd6..c47807b31a 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -55,6 +55,7 @@ jobs: .github dotnet workflow-samples + - name: Setup dotnet uses: actions/setup-dotnet@v5.0.0 with: @@ -114,7 +115,7 @@ jobs: run: echo "github.event_name:${{ github.event_name }} matrix.integration-tests:${{ matrix.integration-tests }} github.event.action:${{ github.event.action }} github.event.pull_request.merged:${{ github.event.pull_request.merged }}" - name: Azure CLI Login - if: github.event_name != 'pull_request' && matrix.integration-tests + if: (github.event_name == 'merge_group' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && matrix.integration-tests uses: azure/login@v2 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} @@ -123,7 +124,7 @@ jobs: - name: Run Integration Tests shell: bash - if: github.event_name != 'pull_request' && matrix.integration-tests + if: (github.event_name == 'merge_group' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && matrix.integration-tests run: | export INTEGRATION_TEST_PROJECTS=$(find ./dotnet -type f -name "*IntegrationTests.csproj" | tr '\n' ' ') for project in $INTEGRATION_TEST_PROJECTS; do