name: .NET Integration Tests on Production

on:
  pull_request:
    branches: [ main ]

jobs:
  check-env:
    outputs:
      has-key: ${{ steps.project-id.outputs.defined }}
    runs-on: ubuntu-latest
    steps:
    - id: project-id
      env:
        GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
      if: "${{ env.GCP_PROJECT_ID != '' }}"
      run: echo "::set-output name=defined::true"

  integration-tests-on-prod:
    needs: [check-env]
    if: needs.check-env.outputs.has-key == 'true'
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup .NET
      uses: actions/setup-dotnet@v2
      with:
        dotnet-version: 3.1.x
    - name: Setup GCloud
      uses: google-github-actions/setup-gcloud@master
      with:
        project_id: ${{ secrets.GCP_PROJECT_ID }}
        service_account_key: ${{ secrets.GCP_SA_KEY }}
        export_default_credentials: true
    - name: Restore dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --no-restore
    - name: Integration Tests on Production
      working-directory: ./Google.Cloud.Spanner.NHibernate.IntegrationTests
      run: dotnet test --verbosity normal
      env:
        JOB_TYPE: test
        TEST_PROJECT: ${{ secrets.GCP_PROJECT_ID }}

name: .NET Integration Tests on Production

on:
  pull_request:
    branches: [ main ]

jobs:
  check-env:
    outputs:
      has-key: ${{ steps.project-id.outputs.defined }}
    runs-on: ubuntu-latest
    steps:
    - id: project-id
      env:
        GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
      if: "${{ env.GCP_PROJECT_ID != '' }}"
      run: echo "::set-output name=defined::true"

  integration-tests-on-prod:
    needs: [check-env]
    if: needs.check-env.outputs.has-key == 'true'
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Setup .NET
      uses: actions/setup-dotnet@v2
      with:
        dotnet-version: 3.1.x
    - name: Setup GCloud
      uses: google-github-actions/setup-gcloud@main
      with:
        project_id: ${{ secrets.GCP_PROJECT_ID }}
        service_account_key: ${{ secrets.GCP_SA_KEY }}
        export_default_credentials: true
    - name: Restore dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --no-restore
    - name: Integration Tests on Production
      working-directory: ./Google.Cloud.Spanner.NHibernate.IntegrationTests
      run: dotnet test --verbosity normal
      env:
        JOB_TYPE: test
        TEST_PROJECT: ${{ secrets.GCP_PROJECT_ID }}

Update action to refer to main
chore: Update action to refer to main

This should fix presubmit errors on #107