actionlint
actionlint copied to clipboard
`result` property of the `jobs` context throws an error
Greetings!
I've noticed an issue with actionlint when it complains property "result" is not defined in object type {outputs: {}}
Code:
on:
workflow_call:
outputs:
build-result:
description: Result of the build
value: ${{ jobs.build.result }}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: build
run: build-command
Here the result is a property from the jobs context: jobs.<job_id>.result https://docs.github.com/en/actions/learn-github-actions/contexts#jobs-context
In this case outputs.build-result contains the build job result which could be success, failure, cancelled, or skipped.
Lower in a caller workflow I call another and pass a boolean parameter this way and it works
publish: ${{ needs.build-clients.outputs.build-result == 'success' }}
We're seeing this too in some of our CI/CD pipelines on GHES