[GH-ISSUE #1692] Calling a Docker actions with an input parameter called "args" overrides the "args" parameter used when calling the container. #836

Closed
opened 2026-03-01 21:46:47 +03:00 by kerem · 1 comment
Owner

Originally created by @ScionOfDesign on GitHub (Mar 22, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1692

Bug report info

act version:            0.2.43
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 24
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
        /var/run/docker.sock
Config files:
        /home/scion/.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.18.10
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.43 -X main.commit=44b510f48cac6a58654bf920ee26cc6e1d36ac3a -X main.date=2023-03-01T02:33:51Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 linux
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         44b510f48cac6a58654bf920ee26cc6e1d36ac3a
                vcs.time:             2023-03-01T02:33:29Z
                vcs.modified:         false
Docker Engine:
        Engine version:        20.10.17
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Docker Desktop
        OS type:               linux
        OS version:
        OS arch:               x86_64
        OS kernel:             5.10.102.1-microsoft-standard-WSL2
        OS CPU:                24
        OS memory:             23998 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act

Describe issue

I have a composite action that looks like so:

name: rockylinux
description: "Run rockylinux commands."
inputs:
  workingDir:
    description: "Working directory to execute the commands in."
    required: true
    default: "."
  args:
    description: "Arguments to pas tto the container"
    required: true
    default: "."
outputs:
  console:
    description: "The console output of the command."
runs:
  using: docker
  image: Dockerfile
  args:
  - "${{ inputs.workingDir }}"
  - "${{ inputs.args }}"

I call it from my master.yaml file like so:

- uses: act/common/distros/rockylinux4@master
   with:
      workingDir: test
      args: ls -al

However, when running act the workingDir parameter is completely ignored like so:
docker run image=act-act-common-distros-rockylinux-master-distros-rockylinux-dockeraction:latest platform= entrypoint=[] cmd=["ls" "-al"]
Note how test is not in the cmd array.

However, if I rename args to args1, it works as expected:
docker run image=act-act-common-distros-rockylinux-master-distros-rockylinux-dockeraction:latest platform= entrypoint=[] cmd=["test" "ls -al"

No response

Workflow content

on:
  push:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - run: |
        mkdir -p test
        echo "Hi mom!" > test/hi.txt
    - uses: act/common/distros/rockylinux@master
      with:
        workingDir: test
        args: ls -al

Relevant log output

There is no additional relevant log output.

Additional information

No response

Originally created by @ScionOfDesign on GitHub (Mar 22, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1692 ### Bug report info ```plain text act version: 0.2.43 GOOS: linux GOARCH: amd64 NumCPU: 24 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /home/scion/.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.18.10 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -compiler: gc -ldflags: -s -w -X main.version=0.2.43 -X main.commit=44b510f48cac6a58654bf920ee26cc6e1d36ac3a -X main.date=2023-03-01T02:33:51Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: 44b510f48cac6a58654bf920ee26cc6e1d36ac3a vcs.time: 2023-03-01T02:33:29Z vcs.modified: false Docker Engine: Engine version: 20.10.17 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.10.102.1-microsoft-standard-WSL2 OS CPU: 24 OS memory: 23998 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act ``` ### Describe issue I have a composite action that looks like so: ```yaml name: rockylinux description: "Run rockylinux commands." inputs: workingDir: description: "Working directory to execute the commands in." required: true default: "." args: description: "Arguments to pas tto the container" required: true default: "." outputs: console: description: "The console output of the command." runs: using: docker image: Dockerfile args: - "${{ inputs.workingDir }}" - "${{ inputs.args }}" ``` I call it from my `master.yaml` file like so: ```yaml - uses: act/common/distros/rockylinux4@master with: workingDir: test args: ls -al ``` However, when running `act` the `workingDir` parameter is _completely ignored_ like so: `docker run image=act-act-common-distros-rockylinux-master-distros-rockylinux-dockeraction:latest platform= entrypoint=[] cmd=["ls" "-al"]` Note how `test` is not in the `cmd` array. However, if I rename `args` to `args1`, it works as expected: `docker run image=act-act-common-distros-rockylinux-master-distros-rockylinux-dockeraction:latest platform= entrypoint=[] cmd=["test" "ls -al"` ### Link to GitHub repository _No response_ ### Workflow content ```yml on: push: jobs: test: runs-on: ubuntu-latest steps: - run: | mkdir -p test echo "Hi mom!" > test/hi.txt - uses: act/common/distros/rockylinux@master with: workingDir: test args: ls -al ``` ### Relevant log output ```sh There is no additional relevant log output. ``` ### Additional information _No response_
kerem 2026-03-01 21:46:47 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ScionOfDesign commented on GitHub (Mar 22, 2023):

Closed because it's not actually a bug. Just frustrating to debug.

<!-- gh-comment-id:1479216262 --> @ScionOfDesign commented on GitHub (Mar 22, 2023): Closed because it's not actually a bug. Just frustrating to debug.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#836
No description provided.