Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change gcloud auth to OIDC #875

Merged
merged 9 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/build-and-push-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,25 @@ on:
- cron: "0 4 * * *"
workflow_dispatch:

permissions:
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: 'auth'
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CRED_JSON }}'
workload_identity_provider: 'projects/135982812994/locations/global/workloadIdentityPools/cicd-tooling/providers/github-actions'
service_account: '[email protected]'
- name: Configure Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Configure Docker Client
run: |-
gcloud auth configure-docker --quiet #authenticate to gcr
gcloud auth configure-docker --quiet # authenticate to gcr
- name: Clean Docker images
run: |-
echo "Available storage before cleaning:"
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/build-and-push-release-gar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ on:
- '**'
workflow_dispatch:

permissions:
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: 'auth'
- id: auth
uses: google-github-actions/auth@v2
with:
project_id: "vorvan"
credentials_json: "${{ secrets.GAR_PUSH_CREDENTIALS }}"
workload_identity_provider: 'projects/135982812994/locations/global/workloadIdentityPools/cicd-tooling/providers/github-actions'
service_account: '[email protected]'
- name: Configure Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Configure Docker Client
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/build-and-push-release-gcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@ on:
tags:
- '**'
workflow_dispatch:
permissions:
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- id: 'auth'
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CRED_JSON }}'
workload_identity_provider: 'projects/135982812994/locations/global/workloadIdentityPools/cicd-tooling/providers/github-actions'
service_account: '[email protected]'
- name: Configure Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Configure Docker Client
Expand Down
Loading