diff --git a/action.yaml b/action.yaml index 11b2c82..09c2f81 100644 --- a/action.yaml +++ b/action.yaml @@ -36,7 +36,7 @@ runs: # e.g. octocat/hello-world/.github/workflows/my-workflow.yml@refs/heads/my_branch -> .github/workflows/my-workflow.yml workflow_path="$(echo "${workflow_ref%@*}" | cut -d/ -f3-)" - job_name_template="$(job_key="${job_key}" yq '.jobs[env(job_key)] | select(has("name")).name // ""' "${repo_path}/${workflow_path:?}")" + job_name_template="$(job_key="${job_key}" yq '.jobs[env(job_key)] | select(has("name")).name | select(. != null)' "${repo_path}/${workflow_path:?}")" echo "name-template=${job_name_template}" | tee -a "$GITHUB_OUTPUT" env: repo_path: ${{ inputs.path || format('{0}/repo', github.action_path) }}