Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,23 @@ runs:
INPUT_MODULE: ${{ inputs.module }}
run: |
tmpout=$(mktemp)
cd ${{ inputs.workdir }} && { \
cd ${{ inputs.workdir }}

# Preprocess args: replace backslash-newline with space, then split into array
if [[ -n "${{ inputs.args }}" ]]; then
ARGS=$(echo "${{ inputs.args }}" | awk '{sub(/[ \t]*\\$/, ""); printf "%s", $0; if (!/[ \t]*\\$/) print ""}')
read -r -a ARGS_ARRAY <<< "$ARGS"
else
ARGS_ARRAY=()
fi

DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
dagger \
${{ inputs.dagger-flags }} \
${{ inputs.verb }} \
${INPUT_MODULE:+-m $INPUT_MODULE} \
${{ inputs.args || inputs.call }}; } | tee "${tmpout}"
"${ARGS_ARRAY[@]}" \
${{ inputs.call }} | tee "${tmpout}"

{
# we need a delim that doesn't appear in the output - a hash of the
Expand Down