actionlint icon indicating copy to clipboard operation
actionlint copied to clipboard

`result` property of the `jobs` context throws an error

Open itachenko opened this issue 2 years ago • 1 comments

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' }}

itachenko avatar Aug 16 '23 13:08 itachenko

We're seeing this too in some of our CI/CD pipelines on GHES

RonaldPhilipsen avatar Jun 19 '25 19:06 RonaldPhilipsen