This is an automated email from the ASF dual-hosted git repository.
vterentev pushed a commit to branch vitalii-t-test-activate-sa
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/vitalii-t-test-activate-sa by
this push:
new a51d1c8ce39 Locate and export ADC file path
a51d1c8ce39 is described below
commit a51d1c8ce39db5d0c9e60640b003d8711876d7db
Author: Vitaly Terentyev <[email protected]>
AuthorDate: Tue Apr 15 12:10:21 2025 +0400
Locate and export ADC file path
---
.../workflows/beam_Publish_Beam_SDK_Snapshots.yml | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml
b/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml
index 9dda843b0ca..70a8a487399 100644
--- a/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml
+++ b/.github/workflows/beam_Publish_Beam_SDK_Snapshots.yml
@@ -97,25 +97,22 @@ jobs:
- name: Authenticate on GCP
uses: google-github-actions/auth@v2
with:
- service_account: ${{ secrets.GCP_SA_EMAIL }}
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- - name: Activate service account
+ - name: Locate and export ADC file path
+ id: auth_file
run: |
- echo '${{ secrets.GCP_SA_KEY }}' > /tmp/key.json
- for i in {1..5}; do
- if gcloud auth activate-service-account --key-file=/tmp/key.json;
then
- echo "Auth success"
- break
- else
- echo "Auth failed, retrying in 5s..."
- sleep 5
- fi
- done
+ echo "adc_file=$(find "${GITHUB_WORKSPACE}" -name
'gha-creds-*.json')" >> $GITHUB_OUTPUT
- name: GCloud Docker credential helper
run: |
+ export CREDENTIALS_FILE="${{ steps.auth_file.outputs.adc_file }}"
+ gcloud config set account "$(jq -r '.client_email'
"$CREDENTIALS_FILE")"
gcloud auth configure-docker ${{ env.docker_registry }}
+ - name: Debug active gcloud auth
+ run: |
+ gcloud auth list
+ gcloud config list account
- name: Setup Java environment
if: ${{ startsWith(matrix.container_task, 'java') }}
uses: ./.github/actions/setup-environment-action