Replies: 1 comment
|
The issue is that reusable workflows (called via When your reusable workflow runs, Fix: Pass variables as inputsReusable workflow (callee):name: Common Google Cloud Auth
on:
workflow_call:
inputs:
workload_identity_provider:
required: true
type: string
service_account:
required: true
type: string
outputs:
access_token:
value: ${{ jobs.auth.outputs.access_token }}
jobs:
auth:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
outputs:
access_token: ${{ steps.auth.outputs.access_token }}
steps:
- name: Login to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
token_format: access_token
workload_identity_provider: ${{ inputs.workload_identity_provider }}
service_account: ${{ inputs.service_account }}Caller workflow:jobs:
auth:
uses: ./.github/workflows/google-auth.yml
with:
workload_identity_provider: ${{ vars.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ vars.GOOGLE_SERVICE_ACCOUNT }}The caller has access to its own For secrets, use the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I was trying to create a reusable workflow for Google Cloud auth actions, but getting
Unrecognized named-valueand I cannot figure out what's wrong.Here is my reusable workflow.
I've set

GOOGLE_WORKLOAD_IDENTITY_PROVIDERandGOOGLE_SERVICE_ACCOUNTas repository variables so this should work, however it throws following errors.jobsparameter is also used in the official reusable workflow example, so this should be correct. I cannot figure out this cause.https://docs.github.com/en/actions/sharing-automations/reusing-workflows#using-outputs-from-a-reusable-workflow
All reactions