-
Notifications
You must be signed in to change notification settings - Fork 198
Description
When using the following @actions/core package, I'm setting an output and then trying to reference it in a downstream action. The output is available and proper, but actionlint is throwing the following error which indicates that the only property of outputs that is available is results:
.github/workflows/ci.yml:21:33: property "color" is not defined in object type {result: string} [expression]
When calling ${{ steps.assign.outputs.results }} it doesn't return anything. I'm not sure if I'm doing something wrong or frowned upon with this mechanism, but wanted to open this issue to see if anyone else has ran into the problem?
Playground (which I think is awesome)
Code excerpt of how the setOutput command functions:
https://github.com/actions/toolkit/blob/27f76dfe1afb2b7e5e679cd8e97192d34d8320e6/packages/core/src/core.ts#L190
export function setOutput(name: string, value: any): void {
process.stdout.write(os.EOL)
issueCommand('set-output', {name}, value)
}
Github Action example:
jobs:
test-workflow:
name: color is cool
runs-on: ubuntu-latest
steps:
- id: assign
uses: actions/github-script@v5
with:
script: |
core.setOutput('color', 'pink');
- id: call
run: |
echo "color is ${{ steps.assign.outputs.color }}"
