I'm trying to upload logs separately for each failing job in a matrix. Each set of logs needs to have a name based on the job matrix, otherwise they clobber each other and I can't tell which job the resulting artifact came from.
I tried printing all the contexts:
name: My workflow
on:
pull_request:
types: [opened, synchronize]
jobs:
my-job:
name: OS ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-18.04
- ubuntu-20.04
steps:
- run: echo "${{ toJSON(github) }}"
- run: echo "${{ toJSON(env) }}"
- run: echo "${{ toJSON(job) }}"
- run: echo "${{ toJSON(steps) }}"
- run: echo "${{ toJSON(runner) }}"
- run: echo "${{ toJSON(secrets) }}"
- run: echo "${{ toJSON(strategy) }}"
- run: echo "${{ toJSON(matrix) }}"
- run: echo "${{ toJSON(needs) }}"
- run: echo "${{ toJSON(inputs) }}"
None of these contain the job name as displayed when running the workflow.