diff --git a/.github/fork_workflows/fork_pr_integration_tests_gcp.yml b/.github/fork_workflows/fork_pr_integration_tests_gcp.yml index 2ea859ce640..bab457465c0 100644 --- a/.github/fork_workflows/fork_pr_integration_tests_gcp.yml +++ b/.github/fork_workflows/fork_pr_integration_tests_gcp.yml @@ -43,12 +43,15 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18.0 + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - name: Upgrade pip version diff --git a/.github/workflows/java_master_only.yml b/.github/workflows/java_master_only.yml index 25cb9d2f4fe..2a2e1433ea5 100644 --- a/.github/workflows/java_master_only.yml +++ b/.github/workflows/java_master_only.yml @@ -27,12 +27,15 @@ jobs: with: python-version: "3.8" architecture: x64 - - uses: google-github-actions/setup-gcloud@v1 + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK + uses: google-github-actions/setup-gcloud@v1 with: version: '290.0.1' - export_default_credentials: true project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - run: gcloud auth configure-docker --quiet - name: Get version run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV @@ -150,12 +153,15 @@ jobs: key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-it-maven- + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - name: Set up AWS SDK diff --git a/.github/workflows/java_pr.yml b/.github/workflows/java_pr.yml index 029cf1c3e81..90a1fc2044b 100644 --- a/.github/workflows/java_pr.yml +++ b/.github/workflows/java_pr.yml @@ -78,12 +78,15 @@ jobs: with: python-version: "3.8" architecture: x64 - - uses: google-github-actions/setup-gcloud@v1 + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK + uses: google-github-actions/setup-gcloud@v1 with: version: '290.0.1' - export_default_credentials: true project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - run: gcloud auth configure-docker --quiet - name: Build image run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA} @@ -122,12 +125,15 @@ jobs: key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-it-maven- + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - name: Set up AWS SDK diff --git a/.github/workflows/master_only.yml b/.github/workflows/master_only.yml index 97a3b603a0c..1190ec11e98 100644 --- a/.github/workflows/master_only.yml +++ b/.github/workflows/master_only.yml @@ -94,12 +94,15 @@ jobs: uses: actions/setup-go@v2 with: go-version: ${{ matrix.go-version }} - - name: Set up Cloud SDK + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - name: Set up AWS SDK @@ -194,12 +197,15 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set up Cloud SDK + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - run: gcloud auth configure-docker --quiet diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml index 9e4d93202b1..abb4935b752 100644 --- a/.github/workflows/nightly-ci.yml +++ b/.github/workflows/nightly-ci.yml @@ -144,12 +144,15 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18.0 + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - name: Set up AWS SDK diff --git a/.github/workflows/pr_integration_tests.yml b/.github/workflows/pr_integration_tests.yml index fb60bec691e..13f2d04437c 100644 --- a/.github/workflows/pr_integration_tests.yml +++ b/.github/workflows/pr_integration_tests.yml @@ -120,12 +120,15 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.18.0 + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - name: Set up AWS SDK diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 40aafe63f69..cb8e459e8c7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -64,12 +64,15 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Set up Cloud SDK + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: + version: '290.0.1' project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true - name: Use gcloud CLI run: gcloud info - run: gcloud auth configure-docker --quiet @@ -104,12 +107,15 @@ jobs: VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }} steps: - uses: actions/checkout@v2 - - uses: google-github-actions/setup-gcloud@v1 + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK + uses: google-github-actions/setup-gcloud@v1 with: version: '290.0.1' - export_default_credentials: true project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - run: gcloud auth configure-docker --quiet - name: Remove previous Helm run: sudo rm -rf $(which helm) diff --git a/docs/project/maintainers.md b/docs/project/maintainers.md index 901ce99dc1d..b5e01dc4c31 100644 --- a/docs/project/maintainers.md +++ b/docs/project/maintainers.md @@ -35,12 +35,15 @@ Fork specific integration tests are run by the `fork_pr_integration_tests.yml_[p 2. If your offline store/online store needs special setup, add it to the job similar to how gcp is setup. ```yaml - - name: Set up gcloud SDK + - name: Authenticate to Google Cloud + uses: 'google-github-actions/auth@v1' + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - export_default_credentials: true + version: '290.0.1' + project_id: ${{ secrets.GCP_PROJECT_ID }} ``` 3. Add any environment variables that you need to your github [secrets](https://github.com/Azure/actions-workflow-samples/blob/master/assets/create-secrets-for-GitHub-workflows.md).