Skip to content

Commit 62e2005

Browse files
authored
ci: Fix workflows to use new gcloud auth step (#3392)
Signed-off-by: Danny Chiao <danny@tecton.ai> Signed-off-by: Danny Chiao <danny@tecton.ai>
1 parent 7b0af0d commit 62e2005

File tree

8 files changed

+68
-32
lines changed

8 files changed

+68
-32
lines changed

.github/fork_workflows/fork_pr_integration_tests_gcp.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,15 @@ jobs:
4343
uses: actions/setup-go@v2
4444
with:
4545
go-version: 1.18.0
46+
- name: Authenticate to Google Cloud
47+
uses: 'google-github-actions/auth@v1'
48+
with:
49+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
4650
- name: Set up gcloud SDK
4751
uses: google-github-actions/setup-gcloud@v1
4852
with:
53+
version: '290.0.1'
4954
project_id: ${{ secrets.GCP_PROJECT_ID }}
50-
service_account_key: ${{ secrets.GCP_SA_KEY }}
51-
export_default_credentials: true
5255
- name: Use gcloud CLI
5356
run: gcloud info
5457
- name: Upgrade pip version

.github/workflows/java_master_only.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,15 @@ jobs:
2727
with:
2828
python-version: "3.8"
2929
architecture: x64
30-
- uses: google-github-actions/setup-gcloud@v1
30+
- name: Authenticate to Google Cloud
31+
uses: 'google-github-actions/auth@v1'
32+
with:
33+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
34+
- name: Set up gcloud SDK
35+
uses: google-github-actions/setup-gcloud@v1
3136
with:
3237
version: '290.0.1'
33-
export_default_credentials: true
3438
project_id: ${{ secrets.GCP_PROJECT_ID }}
35-
service_account_key: ${{ secrets.GCP_SA_KEY }}
3639
- run: gcloud auth configure-docker --quiet
3740
- name: Get version
3841
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
@@ -150,12 +153,15 @@ jobs:
150153
key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }}
151154
restore-keys: |
152155
${{ runner.os }}-it-maven-
156+
- name: Authenticate to Google Cloud
157+
uses: 'google-github-actions/auth@v1'
158+
with:
159+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
153160
- name: Set up gcloud SDK
154161
uses: google-github-actions/setup-gcloud@v1
155162
with:
163+
version: '290.0.1'
156164
project_id: ${{ secrets.GCP_PROJECT_ID }}
157-
service_account_key: ${{ secrets.GCP_SA_KEY }}
158-
export_default_credentials: true
159165
- name: Use gcloud CLI
160166
run: gcloud info
161167
- name: Set up AWS SDK

.github/workflows/java_pr.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@ jobs:
7878
with:
7979
python-version: "3.8"
8080
architecture: x64
81-
- uses: google-github-actions/setup-gcloud@v1
81+
- name: Authenticate to Google Cloud
82+
uses: 'google-github-actions/auth@v1'
83+
with:
84+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
85+
- name: Set up gcloud SDK
86+
uses: google-github-actions/setup-gcloud@v1
8287
with:
8388
version: '290.0.1'
84-
export_default_credentials: true
8589
project_id: ${{ secrets.GCP_PROJECT_ID }}
86-
service_account_key: ${{ secrets.GCP_SA_KEY }}
8790
- run: gcloud auth configure-docker --quiet
8891
- name: Build image
8992
run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA}
@@ -122,12 +125,15 @@ jobs:
122125
key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }}
123126
restore-keys: |
124127
${{ runner.os }}-it-maven-
128+
- name: Authenticate to Google Cloud
129+
uses: 'google-github-actions/auth@v1'
130+
with:
131+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
125132
- name: Set up gcloud SDK
126133
uses: google-github-actions/setup-gcloud@v1
127134
with:
135+
version: '290.0.1'
128136
project_id: ${{ secrets.GCP_PROJECT_ID }}
129-
service_account_key: ${{ secrets.GCP_SA_KEY }}
130-
export_default_credentials: true
131137
- name: Use gcloud CLI
132138
run: gcloud info
133139
- name: Set up AWS SDK

.github/workflows/master_only.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ jobs:
9494
uses: actions/setup-go@v2
9595
with:
9696
go-version: ${{ matrix.go-version }}
97-
- name: Set up Cloud SDK
97+
- name: Authenticate to Google Cloud
98+
uses: 'google-github-actions/auth@v1'
99+
with:
100+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
101+
- name: Set up gcloud SDK
98102
uses: google-github-actions/setup-gcloud@v1
99103
with:
104+
version: '290.0.1'
100105
project_id: ${{ secrets.GCP_PROJECT_ID }}
101-
service_account_key: ${{ secrets.GCP_SA_KEY }}
102-
export_default_credentials: true
103106
- name: Use gcloud CLI
104107
run: gcloud info
105108
- name: Set up AWS SDK
@@ -194,12 +197,15 @@ jobs:
194197
with:
195198
username: ${{ secrets.DOCKERHUB_USERNAME }}
196199
password: ${{ secrets.DOCKERHUB_TOKEN }}
197-
- name: Set up Cloud SDK
200+
- name: Authenticate to Google Cloud
201+
uses: 'google-github-actions/auth@v1'
202+
with:
203+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
204+
- name: Set up gcloud SDK
198205
uses: google-github-actions/setup-gcloud@v1
199206
with:
207+
version: '290.0.1'
200208
project_id: ${{ secrets.GCP_PROJECT_ID }}
201-
service_account_key: ${{ secrets.GCP_SA_KEY }}
202-
export_default_credentials: true
203209
- name: Use gcloud CLI
204210
run: gcloud info
205211
- run: gcloud auth configure-docker --quiet

.github/workflows/nightly-ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,15 @@ jobs:
144144
uses: actions/setup-go@v2
145145
with:
146146
go-version: 1.18.0
147+
- name: Authenticate to Google Cloud
148+
uses: 'google-github-actions/auth@v1'
149+
with:
150+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
147151
- name: Set up gcloud SDK
148152
uses: google-github-actions/setup-gcloud@v1
149153
with:
154+
version: '290.0.1'
150155
project_id: ${{ secrets.GCP_PROJECT_ID }}
151-
service_account_key: ${{ secrets.GCP_SA_KEY }}
152-
export_default_credentials: true
153156
- name: Use gcloud CLI
154157
run: gcloud info
155158
- name: Set up AWS SDK

.github/workflows/pr_integration_tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,15 @@ jobs:
120120
uses: actions/setup-go@v2
121121
with:
122122
go-version: 1.18.0
123+
- name: Authenticate to Google Cloud
124+
uses: 'google-github-actions/auth@v1'
125+
with:
126+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
123127
- name: Set up gcloud SDK
124128
uses: google-github-actions/setup-gcloud@v1
125129
with:
130+
version: '290.0.1'
126131
project_id: ${{ secrets.GCP_PROJECT_ID }}
127-
service_account_key: ${{ secrets.GCP_SA_KEY }}
128-
export_default_credentials: true
129132
- name: Use gcloud CLI
130133
run: gcloud info
131134
- name: Set up AWS SDK

.github/workflows/publish.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@ jobs:
6464
with:
6565
username: ${{ secrets.DOCKERHUB_USERNAME }}
6666
password: ${{ secrets.DOCKERHUB_TOKEN }}
67-
- name: Set up Cloud SDK
67+
- name: Authenticate to Google Cloud
68+
uses: 'google-github-actions/auth@v1'
69+
with:
70+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
71+
- name: Set up gcloud SDK
6872
uses: google-github-actions/setup-gcloud@v1
6973
with:
74+
version: '290.0.1'
7075
project_id: ${{ secrets.GCP_PROJECT_ID }}
71-
service_account_key: ${{ secrets.GCP_SA_KEY }}
72-
export_default_credentials: true
7376
- name: Use gcloud CLI
7477
run: gcloud info
7578
- run: gcloud auth configure-docker --quiet
@@ -104,12 +107,15 @@ jobs:
104107
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
105108
steps:
106109
- uses: actions/checkout@v2
107-
- uses: google-github-actions/setup-gcloud@v1
110+
- name: Authenticate to Google Cloud
111+
uses: 'google-github-actions/auth@v1'
112+
with:
113+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
114+
- name: Set up gcloud SDK
115+
uses: google-github-actions/setup-gcloud@v1
108116
with:
109117
version: '290.0.1'
110-
export_default_credentials: true
111118
project_id: ${{ secrets.GCP_PROJECT_ID }}
112-
service_account_key: ${{ secrets.GCP_SA_KEY }}
113119
- run: gcloud auth configure-docker --quiet
114120
- name: Remove previous Helm
115121
run: sudo rm -rf $(which helm)

docs/project/maintainers.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ Fork specific integration tests are run by the `fork_pr_integration_tests.yml_[p
3535
2. If your offline store/online store needs special setup, add it to the job similar to how gcp is setup.
3636

3737
```yaml
38-
- name: Set up gcloud SDK
38+
- name: Authenticate to Google Cloud
39+
uses: 'google-github-actions/auth@v1'
40+
with:
41+
credentials_json: '${{ secrets.GCP_SA_KEY }}'
42+
- name: Set up gcloud SDK
3943
uses: google-github-actions/setup-gcloud@v1
4044
with:
41-
project_id: ${{ secrets.GCP_PROJECT_ID }}
42-
service_account_key: ${{ secrets.GCP_SA_KEY }}
43-
export_default_credentials: true
45+
version: '290.0.1'
46+
project_id: ${{ secrets.GCP_PROJECT_ID }}
4447
```
4548
4649
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).

0 commit comments

Comments
 (0)