debug token request #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Deploy to Cloud Run" | |
on: | |
push: | |
env: | |
DOCKER_IMAGE_URL: ${{ vars.GCP_GAR_LOCATION }}-docker.pkg.dev/${{ vars.GCP_PROJECT_ID }}/${{ vars.GCP_REPO }}/${{ vars.GCP_APP }}:${{ github.sha }} | |
SERVICE: ${{ vars.GCP_SERVICE }} | |
PROJECT_ID: ${{ vars.GCP_PROJECT_ID }} | |
SERVICE_ACCOUNT: ${{ vars.GCP_SERVICE_ACCOUNT }} | |
WORKLOAD_IDENTITY_PROVIDER: ${{ vars.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
steps: | |
# - name: Checkout | |
# uses: actions/checkout@v3 | |
- name: Checkout actions-oidc-debugger | |
uses: actions/checkout@v3 | |
with: | |
repository: github/actions-oidc-debugger | |
ref: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: ./.github/actions/actions-oidc-debugger | |
- name: Debug OIDC Claims | |
uses: ./.github/actions/actions-oidc-debugger | |
with: | |
audience: 'projects/YOUR_PROJECT_NUMBER/locations/global/workloadIdentityPools/YOUR_PROJECT_ID/providers/YOUR_WIF_PROVIDER_POOL_NAME' | |
- name: Google auth | |
id: auth | |
uses: 'google-github-actions/auth@v2' | |
with: | |
token_format: 'access_token' | |
workload_identity_provider: ${{ env.WORKLOAD_IDENTITY_PROVIDER }} | |
service_account: ${{ env.SERVICE_ACCOUNT }} | |
- name: Set up Cloud SDK | |
uses: google-github-actions/setup-gcloud@v1 | |
with: | |
project_id: ${{ env.PROJECT_ID }} | |
- name: Docker Auth | |
run: |- | |
docker build -t ${{ env.DOCKER_IMAGE_URL }} --file Dockerfile . | |
docker push ${{ env.DOCKER_IMAGE_URL }} | |
- name: Deploy to Cloud Run | |
uses: google-github-actions/deploy-cloudrun@v1 | |
with: | |
service: ${{ env.SERVICE }} | |
image: ${{ env.DOCKER_IMAGE_URL }} |