You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/12/09 22:34:55 UTC
[GitHub] [beam] elink21 commented on a diff in pull request #24626: Composite Action to activate SA in GitHub Actions Runners
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: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org