actions / actions/toolkit

needs.<job id>.result is using steps conclusion instead of outcome

Open
#581 5 comments 31 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Thank you 🙇‍♀ for wanting to create an issue in this repository. Before you do, please ensure you are filing the issue in the right place. Issues should only be opened on if the issue relates to code in this repository.

If your issue is relevant to this repository, please include the information below:

Describe the bug
I've been trying to use needs context However if ever your job has continue on error flag set to true and you check the job result via the needs context you'll get success while the job actually fails

To Reproduce
Steps to reproduce the behavior:

  1. Create a failing jobs with continue-on-error set to true
  2. Create another job needing the first one and try to access the first job result

Expected behavior
Expected needs.job1.result to be failure even if flag continue-on-error is set to true

name: Test download Input
on:
  push:
      branches:    
      - master
jobs:
  job1:
    runs-on: ubuntu-latest
    continue-on-error: true
    steps:
      - name: "Check if artifact has already been built"
        id: dwnld
        uses: actions/download-artifact@v2
        with:
          name: ${{ steps.get-commit.outputs.commit }}_${{ matrix.apps }}
      - name: The job has failed
        if: ${{ failure() }}
        run: echo fails
  build_artifact:
    runs-on: ubuntu-latest
    needs: [job1]
    steps:
      - run: echo ${{ needs.job1.result }}

Capture d’écran 2020-09-23 à 16 18 22

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named in the issue. Start by reproducing the supplied workflow and inspect the needs.job1.result expression and the toolkit entry point that computes job results. Done means a failed job with continue-on-error set to true is reported as failure through needs.job1.result.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.