-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean input does not meet YAML 1.2 "Core Schema" #287
Comments
Same for me |
Any news ? |
You could workaround this in a few ways: Use an environment variable - uses: actions/github-script@v6
id: set-images
env:
DO_SOMETHING: ${{ inputs.do_something }}
with:
script: |
const script = require('./.github/workflows/myscript.js')
console.log(script({core})) And then read that value in your script: console.log(JSON.parse(process.env.DO_SOMETHING.toLowerCase())) The Use an input variable
- uses: actions/github-script@v6
id: set-images
with:
do_something: ${{ inputs.do_something }}
script: |
const script = require('./.github/workflows/myscript.js')
console.log(script({core}))
The script should work as-is. Use an environment variable and match the format of inputAction inputs are just input variables in a special format I think we could use an env variable and fake it as an input. This would allow your script to remain unchanged but I don't know if it will get rid of the unrecognized input warnings. - uses: actions/github-script@v6
id: set-images
env:
INPUT_DO_SOMETHING: ${{ inputs.do_something }}
with:
script: |
const script = require('./.github/workflows/myscript.js')
console.log(script({core})) |
see actions/github-script#287 chore: change variable names
see actions/github-script#287 chore: change variable names
I have a reusable workflow (i.e. triggered by the
workflow_call
event)I also have the following input defined in it:
I use the github actions script to invoke a script from a separate file as instructed here, passing the
core
package as inputHere is
myscript.js
This comes from the documentation of
core
package found here.However this attempt fails:
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
ubuntu-latest
v6
The text was updated successfully, but these errors were encountered: