Error: GitHub.DistributedTask.ObjectTemplating.TemplateValidationException: The template is not valid. /home/runner/work/test/test/./.github/actions/test/action.yml (Line: 22, Col: 14): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.PASS
Fix: actions does not have access to secrets, only the workflow is allowed to access secrets.
workflow to pass the secret as:
with:
secret_input: ${{ secrets.SUPER_SECRET }}
And then, in action.yml,
inputs:
secret_input:
description: "..."
required: true
...
runs:
.....
- name: .....
env:
MY_SECRET: ${{ inputs.secret_input }}