Skip to content

Commit

Permalink
Create oidc.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoref authored Mar 13, 2024
1 parent 5df69bc commit 8fe4369
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/oidc.yml
Original file line number Diff line number Diff line change
@@ -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: '[email protected]'
- 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

0 comments on commit 8fe4369

Please sign in to comment.