name: Test
on:
workflow_call:
secrets:
MY_SECRET:
required: true
jobs:
shared-setup:
uses: *****/*****/.github/workflows/shared-setup.yml@main
unique-test:
runs-on: ubuntu-latest
needs: shared-setup
env:
SUPER_SECRET: ${{ secrets.MY_SECRET }}
- name: Do something
run: echo "Hello World!"
I seem to have an errror in my YAML doc. but I can’t see it. Deploying to GitHub results in an error that the document has an error in the yaml syntax near the line saying unique-test:
.
2
Answers
you can use online tool like yaml checker or editor in the github workflow it self. and it’s quite helpful.
uses
ofshared-setup
should be in string, you can use``
|''
steps
,the result should be like:
Missing
steps
in your second job i.e.unique-test
.I believe that in your first job, you deliberately redacted the username/repo for
uses
. Once thesteps
key is added and those asterisks are replaced with valid values, it should work fine.Fixed workflow (linted):