Skip to content

Commit

Permalink
fixup! Fallback on using job key
Browse files Browse the repository at this point in the history
  • Loading branch information
omus committed Aug 16, 2024
1 parent e804091 commit ed905aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down

0 comments on commit ed905aa

Please sign in to comment.