Skip to content

Commit

Permalink
[bug] Fix parent Neonctl parameter affected by IFS (#61)
Browse files Browse the repository at this point in the history
* [bug] Fix parent Neonctl parameter affected by IFS

* + github.action.ref
  • Loading branch information
antelman107 authored Aug 22, 2024
1 parent feb0f3d commit c041c5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ runs:
ANNOTATION_COMMIT_SHA: ${{ github.event.after || '' }}
ANNOTATION_COMMIT_REF: ${{ github.event.ref || github.event.pull_request.head.ref || '' }}
ANNOTATION_COMMIT_MESSAGE: ${{ github.event.head_commit.message || '' }}
ANNOTATION_ACTION_REF: ${{ github.action_ref || '' }}
id: create-branch
shell: bash
run: |
Expand All @@ -92,6 +93,7 @@ runs:
--arg github-pr-number "${ANNOTATION_PR_NUMBER}" \
--arg github-pr-title "${ANNOTATION_PR_TITLE}" \
--arg github-commit-ref "${ANNOTATION_COMMIT_REF}" \
--arg github-action-ref "${ANNOTATION_ACTION_REF}" \
)
# set IFS (internal file separator) to \n to avoid JSON space being an arguments separator
Expand All @@ -101,7 +103,7 @@ runs:
--project-id ${{ inputs.project_id }} \
--name "${{ inputs.branch_name }}" \
--suspend-timeout ${{ inputs.suspend_timeout }} \
$(if [[ -n "${{ inputs.parent }}" ]]; then echo "--parent ${{ inputs.parent }}"; fi) \
$(if [[ -n "${{ inputs.parent }}" ]]; then echo "--parent=${{ inputs.parent }}"; fi) \
--output json \
$(if [[ -n "${annotation_json}" ]]; then echo "--annotation='$annotation_json'"; fi) \
2> branch_err > branch_out || true
Expand Down

0 comments on commit c041c5e

Please sign in to comment.