mirror of
https://github.com/dagger/dagger-for-github.git
synced 2025-12-31 20:59:43 +11:00
alias call to args and make it optional
Signed-off-by: kpenfound <kyle@dagger.io>
This commit is contained in:
parent
a320953b08
commit
367e5106ee
3 changed files with 26 additions and 4 deletions
10
action.yml
10
action.yml
|
|
@ -37,6 +37,10 @@ inputs:
|
|||
description: "Whether to stop the Dagger Engine after this run"
|
||||
required: false
|
||||
default: "true"
|
||||
call:
|
||||
description: "Function and arguments for dagger call"
|
||||
required: false
|
||||
default: ""
|
||||
outputs:
|
||||
output:
|
||||
description: "Job output"
|
||||
|
|
@ -70,22 +74,24 @@ runs:
|
|||
| BIN_DIR=${prefix_dir}/bin DAGGER_VERSION="$VERSION" DAGGER_COMMIT="$COMMIT" sh
|
||||
|
||||
- id: exec
|
||||
if: inputs.call != '' || inputs.args != ''
|
||||
shell: bash
|
||||
env:
|
||||
INPUT_MODULE: ${{ inputs.module }}
|
||||
run: |
|
||||
tmpout=$(mktemp)
|
||||
INPUT_ARGS="${ INPUT_ARGS:-INPUT_CALL }"
|
||||
cd ${{ inputs.workdir }} && { \
|
||||
DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \
|
||||
dagger \
|
||||
${{ inputs.dagger-flags }} \
|
||||
${{ inputs.verb }} \
|
||||
${INPUT_MODULE:+-m $INPUT_MODULE} \
|
||||
${{ inputs.args }}; } | tee "${tmpout}"
|
||||
$INPUT_ARGS; } | tee "${tmpout}"
|
||||
|
||||
(echo -n "stdout=" && cat "${tmpout}") >> "$GITHUB_OUTPUT"
|
||||
|
||||
- if: inputs.engine-stop == 'true'
|
||||
- if: (inputs.call != '' || inputs.args != '') && inputs.engine-stop == 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
mapfile -t containers < <(docker ps --filter name="dagger-engine-*" -q)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue