Skip to content

[actions] if actions use Re-run all jobs to start workflows,it will ignore "jobs.<job_id>.needs" #25925

Closed
@zoy0

Description

@zoy0

Description

I use re-run all jobs to rerun a workflow, but instead of sequential, alljobs are executed concurrently.This leads to needs. .outputs cannot be used.

name: outputs
on: push

jobs:
  job1:
    runs-on: ubuntu-latest
    steps:
      - name: step1
        run: |
          echo "first job1 and first step"          

  job2:
    runs-on: ubuntu-latest
    outputs:
      output1: ${{ steps.step1.outputs.output1 }}
      output2: ${{ steps.step2.outputs.output2 }}
    steps:
      - name: step1
        id: step1
        run: |
          date -Is > output1
          cat output1
          echo "output1=$(cat output1)" >> $GITHUB_OUTPUT                    
      - name: step2
        id: step2
        run: |
          cat /proc/sys/kernel/random/uuid > output2
          cat output2
          echo "output2=$(cat output2)" >> $GITHUB_OUTPUT           

  job3:
    needs: [job1,job2]
    runs-on: ubuntu-latest
    steps:
      - run: echo ${{ needs.job2.outputs.output1 }}
      - run: echo ${{ needs.job2.outputs.output2 }}
      - run: echo ${{ needs.job2.result }}

normal operation
image

re-run all jobs:
image

Gitea Version

1.20

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Linux

How are you running Gitea?

docker images: gitea/gitea:1.20 and gitea/act_runner:0.2.3

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions