2

I'm attempting to run the following .yml with GitHub Actions, but the outcome from the steps is not retrieved or null.

The documentation for outcome is here.

name: run test for outcome
on:
  workflow_dispatch:
jobs:
  run-test-for-outcome:
    runs-on: ubuntu-latest
    steps:
      - name: step1
        id: step1
        continue-on-error: true
        run: |
          echo step 1

      - name: test
        run : echo ${{ steps.step1.outcome }}

However, if I run the following:

name: run test for outcome
on:
  workflow_dispatch:
jobs:
  run-test-for-outcome:
    runs-on: ubuntu-latest
    steps:
      - name: step1
        id: step1
        continue-on-error: true
        run: |
          echo step 1

      - name: test
        run : echo ${{ steps.step1.success }}

the value returned is true.

Why is that? Why isn't outcome working as intended?

Benjamin W.
  • 46,058
  • 19
  • 106
  • 116
Darius
  • 31
  • 2

1 Answers1

1

I actually found the problem I was running the workflow locally using https://github.com/nektos/act and that appears to be the problem. When I did test it under Github, the outcome and every step context is working as intended.

Thank you.

Darius
  • 31
  • 2