diff --git a/distros/busybox/action.yaml b/distros/busybox/action.yaml index d780c76..cfa7f14 100644 --- a/distros/busybox/action.yaml +++ b/distros/busybox/action.yaml @@ -1,7 +1,8 @@ name: busybox description: "Run busybox commands." inputs: - command: + #Note: Passing in "args" overwrites the arguments passed into the container directly. + args: description: "Shell command to pass into busybox." required: true outputs: @@ -11,4 +12,4 @@ runs: using: docker image: Dockerfile args: - - ${{ inputs.command }} \ No newline at end of file + - ${{ inputs.args }} \ No newline at end of file diff --git a/distros/rockylinux/action.yaml b/distros/rockylinux/action.yaml index 2fc412c..f3ecf63 100644 --- a/distros/rockylinux/action.yaml +++ b/distros/rockylinux/action.yaml @@ -1,13 +1,10 @@ name: rockylinux description: "Run rockylinux commands." inputs: - command: - description: "Shell command to pass into Rocky Linux." + #Note: Passing in "args" overwrites the arguments passed into the container directly. + args: + description: "Shell arguments to pass into Rocky Linux." required: true - workingDir: - description: "Working directory to execute the commands in." - required: true - default: "." outputs: console: description: "The console output of the command." @@ -15,4 +12,4 @@ runs: using: docker image: Dockerfile args: - - ${{ inputs.workingDir }} ${{ inputs.command }} \ No newline at end of file + - ${{ inputs.args }} \ No newline at end of file diff --git a/distros/rockylinux/entrypoint.sh b/distros/rockylinux/entrypoint.sh index 1b4f23e..8f5bc4c 100644 --- a/distros/rockylinux/entrypoint.sh +++ b/distros/rockylinux/entrypoint.sh @@ -1,9 +1,8 @@ #!/bin/sh -WORKDIR="$1" +WORKDIR=${WORKDIR:"."} cd "$WORKDIR" -ARGS_ARRAY=($@) -ARGS=${array[@]:1} +ARGS="$@" OUTPUT=$(bash -c "$ARGS") RESULT=$? echo "$OUTPUT" diff --git a/utils/chown/action.yaml b/utils/chown/action.yaml index 19fbd36..0f3e907 100644 --- a/utils/chown/action.yaml +++ b/utils/chown/action.yaml @@ -35,4 +35,4 @@ runs: - name: "Take ownership of output." uses: act/common/distros/busybox@master with: - command: chown ${{ steps.ids.outputs.uid }}:${{ steps.ids.outputs.gid }} "${{ inputs.file }}" -R + args: chown ${{ steps.ids.outputs.uid }}:${{ steps.ids.outputs.gid }} "${{ inputs.file }}" -R diff --git a/utils/compress/action.yaml b/utils/compress/action.yaml index 501c690..c972e6a 100644 --- a/utils/compress/action.yaml +++ b/utils/compress/action.yaml @@ -64,4 +64,4 @@ runs: uses: act/common/distros/rockylinux@master with: workingDir: ${{ inputs.workingDir }} - command: ${{ steps.command.outputs.command }} + args: ${{ steps.command.outputs.command }} diff --git a/utils/download/action.yaml b/utils/download/action.yaml index 4275ef5..0b68d13 100644 --- a/utils/download/action.yaml +++ b/utils/download/action.yaml @@ -21,7 +21,7 @@ runs: id: download uses: act/common/distros/rockylinux@master with: - command: sh "_download.sh" "${{ inputs.url }}" "${{ inputs.outputFile }}" + args: sh "_download.sh" "${{ inputs.url }}" "${{ inputs.outputFile }}" - run: rm _download.sh shell: bash - name: "Own artifacts." diff --git a/utils/extract/action.yaml b/utils/extract/action.yaml index 3572ffb..c8ec811 100644 --- a/utils/extract/action.yaml +++ b/utils/extract/action.yaml @@ -35,7 +35,7 @@ runs: id: convert uses: act/common/distros/busybox@master with: - command: ${{ steps.command.outputs.command }} + args: ${{ steps.command.outputs.command }} - name: "Delete source." run: | if [[ ${{ inputs.deleteSource }} != "true" ]]; then