Skip to content

Job outputs doesn't works on Windows runner. #2224

@ghost

Description

Description

Hi,
I use the sample about job outputs from the GitHub documentation (see code below).
When I use "ubuntu-latest" for the job1, I can use job1 outputs into Job2.
image

When I use my self-hosted windows runner for the job1, I can't use job1 outputs into Job2.
In all tests, I use my self-hosted windows runner for the job2
image

In Diag files, we can see the "needs" node does not contains data informations in sub node "outputs".

image

it looks like a bug :-).
Thanks for your help.

To reproduce

Just change the runner used on job1.

Runner version and OS

Version 2.298.2 on Windows Server 2019 Datacenter.

Script

name: test
on:
  pull_request:
    branches: [ master ]

jobs:
  job1:
    runs-on: [self-hosted, windows]
    #runs-on: ubuntu-latest
    outputs:
      output1: ${{ steps.step1.outputs.test }}
      output2: ${{ steps.step2.outputs.test }}
    steps:
      - id: step1
        run: echo "test=hello" >> $GITHUB_OUTPUT
      - id: step2
        run: echo "test=world" >> $GITHUB_OUTPUT
  job2:
    runs-on: [self-hosted, windows, csd-back]
    needs: job1
    steps:
      - run: echo ${{needs.job1.outputs.output1}} ${{needs.job1.outputs.output2}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions