elink21 commented on code in PR #24626:
URL: https://github.com/apache/beam/pull/24626#discussion_r1044890532


##########
.github/actions/activate-service-account/action.yml:
##########
@@ -0,0 +1,21 @@
+name: "Activate Service Account"
+description: Setup a Service account with the key provided in base64 as an 
input
+inputs:
+  GCP_SERVICE_ACCOUNT:
+    description: Service account to activate in base64 format
+    required: true
+
+runs:
+  using: composite
+  steps:
+    - name: Setup GCP account
+      env:
+        SA_KEY_CONTENT: ${{inputs.GCP_SERVICE_ACCOUNT}}
+      shell: bash
+      run: |
+       echo "$SA_KEY_CONTENT" | base64 -d > /tmp/gcp_access.json
+       gcloud auth activate-service-account --key-file="/tmp/gcp_access.json" 
--no-user-output-enabled
+       gcloud auth configure-docker -q --no-user-output-enabled >& /dev/null
+    - name: Removing Keyfile
+      shell: bash
+      run: rm -f /tmp/gcp_access.json

Review Comment:
   Sure, I've added an always() condition to the removal step.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to