Skip to content

Commit c8076e9

Browse files
committed
fix docker auth
1 parent 67b1309 commit c8076e9

File tree

1 file changed

+45
-18
lines changed

1 file changed

+45
-18
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,23 @@ jobs:
4848
- uses: actions/setup-python@v4
4949
with:
5050
python-version: 3.9.15
51-
- name: Auth gcloud
52-
uses: google-github-actions/auth@v1
51+
-
52+
name: Set up Docker Buildx
53+
uses: docker/setup-buildx-action@v3
54+
-
55+
name: Auth gcloud
56+
id: auth
57+
uses: google-github-actions/auth@v2
5358
with:
54-
credentials_json: ${{ secrets.gke-credentials }}
55-
- name: Setup gcloud
56-
uses: google-github-actions/setup-gcloud@v1
59+
token_format: access_token
60+
credentials_json: ${{ secrets.GKE_SA_KEY }}
61+
-
62+
name: Login to GAR
63+
uses: docker/login-action@v3
5764
with:
58-
project_id: ${{ secrets.gke-project }}
65+
registry: europe-west1-docker.pkg.dev
66+
username: oauth2accesstoken
67+
password: ${{ steps.auth.outputs.access_token }}
5968
- name: Configure gcloud
6069
run: |
6170
gcloud --quiet auth configure-docker
@@ -99,14 +108,23 @@ jobs:
99108
- uses: actions/setup-python@v4
100109
with:
101110
python-version: 3.9.15
102-
- name: Auth gcloud
103-
uses: google-github-actions/auth@v1
111+
-
112+
name: Set up Docker Buildx
113+
uses: docker/setup-buildx-action@v3
114+
-
115+
name: Auth gcloud
116+
id: auth
117+
uses: google-github-actions/auth@v2
104118
with:
105-
credentials_json: ${{ secrets.gke-credentials }}
106-
- name: Setup gcloud
107-
uses: google-github-actions/setup-gcloud@v1
119+
token_format: access_token
120+
credentials_json: ${{ secrets.GKE_SA_KEY }}
121+
-
122+
name: Login to GAR
123+
uses: docker/login-action@v3
108124
with:
109-
project_id: ${{ secrets.gke-project }}
125+
registry: europe-west1-docker.pkg.dev
126+
username: oauth2accesstoken
127+
password: ${{ steps.auth.outputs.access_token }}
110128
- name: Configure gcloud
111129
run: |
112130
gcloud --quiet auth configure-docker
@@ -150,14 +168,23 @@ jobs:
150168
- uses: actions/setup-python@v4
151169
with:
152170
python-version: 3.9.15
153-
- name: Auth gcloud
154-
uses: google-github-actions/auth@v1
171+
-
172+
name: Set up Docker Buildx
173+
uses: docker/setup-buildx-action@v3
174+
-
175+
name: Auth gcloud
176+
id: auth
177+
uses: google-github-actions/auth@v2
155178
with:
156-
credentials_json: ${{ secrets.gke-credentials }}
157-
- name: Setup gcloud
158-
uses: google-github-actions/setup-gcloud@v1
179+
token_format: access_token
180+
credentials_json: ${{ secrets.GKE_SA_KEY }}
181+
-
182+
name: Login to GAR
183+
uses: docker/login-action@v3
159184
with:
160-
project_id: ${{ secrets.gke-project }}
185+
registry: europe-west1-docker.pkg.dev
186+
username: oauth2accesstoken
187+
password: ${{ steps.auth.outputs.access_token }}
161188
- name: Configure gcloud
162189
run: |
163190
gcloud --quiet auth configure-docker

0 commit comments

Comments
 (0)