For a workflow, that we use with different inputs, we have multiple jobs, one of the jobs starts with:
rerun-2-failed-test:
name: ${{inputs.test-description || ''}} parse and analyze test results
needs: [test, test-result]
This job is sometimes skipped (as intended), however when we look into the summary page, we than see ${{inputs.test-description || ''}}
in the name of the job.
When the job is not skipped, that part is replaced with the value of inputs.test-description
.
Is there an option to make it an empty string if it is skipped, or even nicer would be to always get the value from inputs.test-description
. The inputs.test-description
is an input of the workflow, and is always known when the workflow is called. If it is not possible, is there another way to use a variable in a name of a job, even when skipped?
We call the workflow an x amount of times, so if they do not have something variable in the name, they are difficult to differentiate between.
for example:
some_test:
name: some_test
uses: ./.github/workflows/above_workflow.yaml
with:
test-description: 'some_test'
some_other_test:
name: some_other_test
uses: ./.github/workflows/above_workflow.yaml
with:
test-description: 'some_other_test'