Skip to content

Commit 0090494

Browse files
authored
Configure GCR auth (#36678)
1 parent 47e3088 commit 0090494

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/beam_PostCommit_Python_ValidatesContainer_Dataflow.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,21 @@ jobs:
7979
with:
8080
java-version: default
8181
python-version: ${{ matrix.python_version }}
82+
- name: Authenticate to GCP
83+
uses: google-github-actions/auth@v3
84+
with:
85+
service_account: ${{ secrets.GCP_SA_EMAIL }}
86+
credentials_json: ${{ secrets.GCP_SA_KEY }}
87+
- name: Set up Cloud SDK
88+
uses: google-github-actions/setup-gcloud@v3
89+
- name: Configure Docker auth for GCR
90+
run: |
91+
gcloud --quiet auth configure-docker us.gcr.io
92+
gcloud --quiet auth configure-docker gcr.io
93+
gcloud auth list
94+
- name: Docker login to GCR (explicit)
95+
run: |
96+
gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://us.gcr.io
8297
- name: Set PY_VER_CLEAN
8398
id: set_py_ver_clean
8499
run: |
@@ -105,7 +120,7 @@ jobs:
105120
uses: actions/upload-artifact@v4
106121
if: failure()
107122
with:
108-
name: Python Test Results
123+
name: Python Test Results ${{ matrix.python_version }}
109124
path: '**/pytest*.xml'
110125
- name: Publish Python Test Results
111126
uses: EnricoMi/publish-unit-test-result-action@v2

0 commit comments

Comments
 (0)