nektos / act

Run your GitHub Actions locally 🚀
https://nektosact.com
MIT License
54.68k stars 1.36k forks source link

Issue: Dockerfile context relative path #739

Open ryuheechul opened 3 years ago

ryuheechul commented 3 years ago

I experience this with such action below

      - name: yq - my yq step
        uses: mikefarah/yq@v4.9.6
        with:
          cmd: yq --help

it appears to use https://github.com/mikefarah/yq/blob/master/Dockerfile even though it points to https://github.com/mikefarah/yq/blob/master/github-action/Dockerfile via https://github.com/mikefarah/yq/blob/master/action.yml#L15.

Probably somethings should be done in this line below to fix this issue. https://github.com/nektos/act/blob/a9fe0383478554705100dc4416b235b2265f718c/pkg/runner/step_context.go#L472

System information

- Operating System: macOS
- Architecture: arm64 (64-bit)
- Apple M1: yes
- Docker version: 20.10.7
- Docker image used in `act`: catthehacker/ubuntu:act-latest
- `act` version: act version 0.2.23

Expected behaviour

use the right context path (github.com/mikefarah/yq/github-action(/Dockerfile)) to build the image

Actual behaviour

use the wrong context path (github.com/mikefarah/yq(/Dockerfile) to build the image

Workflow and/or repository

workflow ```yaml name: example workflow on: [push] jobs: example-action: runs-on: ubuntu-latest steps: - name: yq - my yq step uses: mikefarah/yq@v4.9.6 with: cmd: yq --help ```

Steps to reproduce

act output

Log ```none ... [Repository xxx/myEvent] Starting container: 9403a846d8fa99c60c066cc1b480e0b2039f6d47149122953583cc4abaaed313 | Error: unknown command "yq e --help" for "yq" | Run 'yq --help' for usage. ```

Additional information

About the usage of the yq action, not only works in Github, you can find the spec here as well, https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsimage.

github-actions[bot] commented 3 years ago

Issue is stale and will be closed in 14 days unless there is new activity

mattwynne commented 3 years ago

I'm seeing this too