blob: 6d365fab6c485330672d7647fb3e5fa91254a3cf [file] [log] [blame]
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
if: ${{ always() }}
shell: bash
run: rm -f /tmp/gcp_access.json