79708989

Date: 2025-07-21 11:26:29
Score: 0.5
Natty:
Report link

I did only find a way to list all outputs simpler (only incrementing index):

  outputs:
    j_0_pkg: ${{ steps.update-output.outputs.J_0_pkg }}
    j_1_pkg: ${{ steps.update-output.outputs.J_1_pkg }}
    ...
  steps:
    - name: just to check all outputs are listed
      run: echo total jobs ${{ strategy.job-total }} (from 0 to one less, to 1 here)
      # could check automatically of course
    - name: set error if tests fail
        id: update-output
        if: failure()
        run: echo J_${{ strategy.job-index }}_pkg='error: ${{ matrix.os }} -- ${{ matrix.pkg }}' >> $GITHUB_OUTPUTS

Note: Using strategy.job-index in outputs did not work. It reported "Unrecognized named-value: 'strategy'". But I understand that strategy should be available in jobs.<job_id>.outputs.<output_id> , according to https://docs.github.com/de/actions/reference/contexts-reference#context-availability

Reasons:
  • Blacklisted phrase (1): did not work
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: simohe