I am trying to pass secrets to reusable workflow as shown here: https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow
But the pipeline fails, stating that:
The workflow is not valid. .github/workflows/test.workflow-test.yml (Line: 17, Col: 9): Unexpected value 'secrets'
My .github/actions/test/action.yml looks like that:
name: Reusable workflow example
on:
workflow_call:
inputs:
username:
required: true
type: string
secrets:
token:
required: true
jobs:
example_job:
name: show
runs-on: ubuntu-latest
steps:
- name: show data
runs: echo ${{ secrets.token }}
And I'm calling it accordingly:
name: Call a reusable workflow
on:
push:
branches:
- "feature/workflow-test"
jobs:
my-test-job:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: ./.github/actions/test
with:
username: John
secrets:
token: secret Token
What I am missing here? It is almost identical to the code samples within GitHub's documentation.