actionlint icon indicating copy to clipboard operation
actionlint copied to clipboard

Description key is not required for workflow_call secrets

Open roryabraham opened this issue 2 years ago • 3 comments

The following syntax:

name: Callable Workflow

on:
  workflow_call:
    secrets:
      MY_TOKEN:

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      - run: gh pr comment --body "Test comment"
        env:
          GH_TOKEN: ${{ secrets.MY_TOKEN }}

Results in an error:

"description" is missing at "my_token" secret of workflow_call event

However, the description is optional.

roryabraham avatar Jul 09 '22 07:07 roryabraham

However, the description is optional.

Can you show a link to official document?

rhysd avatar Jul 09 '22 09:07 rhysd

I verified with experiments:

  • Callable workflow (note no description): https://github.com/Andrew-Test-Org/Public-Test-Repo/blob/main/.github/workflows/callableWorkflow.yml
  • Caller workflow: https://github.com/Andrew-Test-Org/Public-Test-Repo/blob/main/.github/workflows/dispatchableWorkflow.yml
  • Workflow run: https://github.com/Andrew-Test-Org/Public-Test-Repo/runs/7262021723?check_suite_focus=true

roryabraham avatar Jul 09 '22 09:07 roryabraham

Documentation is lacking: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_callsecrets

In this example you can see the description key in the yml but not documented elsewhere.

roryabraham avatar Jul 09 '22 09:07 roryabraham

Thanks for fixing this @rhysd! 🎉 🙇

roryabraham avatar Aug 23 '22 10:08 roryabraham