Skip to content

Commit d324cf7

Browse files
ci: fix gcp service accounts (#19312) (#19315)
Backport of #19312
1 parent 3bf6a00 commit d324cf7

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ jobs:
256256
pushd /tmp/proto
257257
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
258258
unzip protoc.zip
259-
cp -r ./bin/* /usr/local/bin
260-
cp -r ./include /usr/local/bin/include
259+
sudo cp -r ./bin/* /usr/local/bin
260+
sudo cp -r ./include /usr/local/bin/include
261261
popd
262262
263263
- name: make gen
@@ -869,8 +869,8 @@ jobs:
869869
pushd /tmp/proto
870870
curl -L -o protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
871871
unzip protoc.zip
872-
cp -r ./bin/* /usr/local/bin
873-
cp -r ./include /usr/local/bin/include
872+
sudo cp -r ./bin/* /usr/local/bin
873+
sudo cp -r ./include /usr/local/bin/include
874874
popd
875875
876876
- name: Setup Go
@@ -1123,8 +1123,8 @@ jobs:
11231123
id: gcloud_auth
11241124
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
11251125
with:
1126-
workload_identity_provider: ${{ secrets.GCP_CODE_SIGNING_WORKLOAD_ID_PROVIDER }}
1127-
service_account: ${{ secrets.GCP_CODE_SIGNING_SERVICE_ACCOUNT }}
1126+
workload_identity_provider: ${{ vars.GCP_CODE_SIGNING_WORKLOAD_ID_PROVIDER }}
1127+
service_account: ${{ vars.GCP_CODE_SIGNING_SERVICE_ACCOUNT }}
11281128
token_format: "access_token"
11291129

11301130
- name: Setup GCloud SDK
@@ -1427,8 +1427,8 @@ jobs:
14271427
- name: Authenticate to Google Cloud
14281428
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
14291429
with:
1430-
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
1431-
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
1430+
workload_identity_provider: ${{ vars.GCP_WORKLOAD_ID_PROVIDER }}
1431+
service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
14321432

14331433
- name: Set up Google Cloud SDK
14341434
uses: google-github-actions/setup-gcloud@6a7c903a70c8625ed6700fa299f5ddb4ca6022e9 # v2.1.5

.github/workflows/dogfood.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ jobs:
131131
- name: Authenticate to Google Cloud
132132
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
133133
with:
134-
workload_identity_provider: projects/573722524737/locations/global/workloadIdentityPools/github/providers/github
135-
service_account: coder-ci@coder-dogfood.iam.gserviceaccount.com
134+
workload_identity_provider: ${{ vars.GCP_WORKLOAD_ID_PROVIDER }}
135+
service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
136136

137137
- name: Terraform init and validate
138138
run: |

.github/workflows/pr-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ jobs:
420420
curl -fsSL "$URL" -o "${DEST}"
421421
chmod +x "${DEST}"
422422
"${DEST}" version
423-
mv "${DEST}" /usr/local/bin/coder
423+
sudo mv "${DEST}" /usr/local/bin/coder
424424
425425
- name: Create first user
426426
if: needs.get_info.outputs.NEW == 'true' || github.event.inputs.deploy == 'true'

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ jobs:
288288
id: gcloud_auth
289289
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
290290
with:
291-
workload_identity_provider: ${{ secrets.GCP_CODE_SIGNING_WORKLOAD_ID_PROVIDER }}
292-
service_account: ${{ secrets.GCP_CODE_SIGNING_SERVICE_ACCOUNT }}
291+
workload_identity_provider: ${{ vars.GCP_CODE_SIGNING_WORKLOAD_ID_PROVIDER }}
292+
service_account: ${{ vars.GCP_CODE_SIGNING_SERVICE_ACCOUNT }}
293293
token_format: "access_token"
294294

295295
- name: Setup GCloud SDK
@@ -698,8 +698,8 @@ jobs:
698698
- name: Authenticate to Google Cloud
699699
uses: google-github-actions/auth@140bb5113ffb6b65a7e9b937a81fa96cf5064462 # v2.1.11
700700
with:
701-
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_ID_PROVIDER }}
702-
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
701+
workload_identity_provider: ${{ vars.GCP_WORKLOAD_ID_PROVIDER }}
702+
service_account: ${{ vars.GCP_SERVICE_ACCOUNT }}
703703

704704
- name: Setup GCloud SDK
705705
uses: google-github-actions/setup-gcloud@6a7c903a70c8625ed6700fa299f5ddb4ca6022e9 # 2.1.5

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy