From 8fe4369530a466b1ab8270e27426745bfc01c7e0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 13 Mar 2024 18:16:30 -0400 Subject: [PATCH] Create oidc.yml --- .github/workflows/oidc.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/oidc.yml diff --git a/.github/workflows/oidc.yml b/.github/workflows/oidc.yml new file mode 100644 index 0000000..ab84a7c --- /dev/null +++ b/.github/workflows/oidc.yml @@ -0,0 +1,26 @@ +name: oidc + +permissions: + id-token: write + +on: + push: + +jobs: + Get_OIDC_ID_token: + runs-on: ubuntu-latest + steps: + - id: 'auth' + name: 'Authenticate to GCP' + uses: 'google-github-actions/auth@v2' + with: + workload_identity_provider: 'projects/552057127791/locations/global/workloadIdentityPools/github/providers/github' + service_account: 'container-builder@helical-crowbar-220917.iam.gserviceaccount.com' + - name: docker + run: | + gcloud auth login --brief --cred-file="${{ steps.auth.outputs.credentials_file_path }}" + gcloud auth list + gcloud auth configure-docker + now=$(date +%s) + image=gcr.io/helical-crowbar-220917/alpine-test:$now + docker pull library/alpine && docker tag library/alpine $image && docker push $image