Skip to content

test keyless authentication #22

test keyless authentication

test keyless authentication #22

Workflow file for this run

name: PR
on:
pull_request:
branches:
- main
jobs:
docker-push:
runs-on: ubuntu-22.04
steps:
- uses: 'actions/checkout@v4'
- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/[email protected]'
with:
workload_identity_provider: 'projects/rich-gar/locations/global/workloadIdentityPools/my-pool/providers/my-provider'
- name: Set Tag and SHA
run: |
CLEAN_TAG=$(echo "${{ github.event.pull_request.head.ref }}" | tr / -)
echo "TAG=$CLEAN_TAG" >> $GITHUB_ENV
echo "SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
- name: Build
run: >
docker build -t europe-west2-docker.pkg.dev/rich-gar/docker-images/eq-runner-maintenance-page:$TAG .
- name: Push to GAR
run: |
docker login -u _json_key --password-stdin https://europe-west2-docker.pkg.dev
gcloud auth configure-docker europe-west2-docker.pkg.dev
echo "Pushing to GAR with tag $TAG"
docker push europe-west2-docker.pkg.dev/rich-gar/docker-images/eq-runner-maintenance-page:$TAG