[GH-ISSUE #739] Issue: Dockerfile context relative path #466

Open
opened 2026-03-01 21:43:40 +03:00 by kerem · 2 comments
Owner

Originally created by @ryuheechul on GitHub (Jun 18, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/739

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. github.com/nektos/act@a9fe038347/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
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
...
[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.

Originally created by @ryuheechul on GitHub (Jun 18, 2021). Original GitHub issue: https://github.com/nektos/act/issues/739 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 <details> <summary>workflow</summary> ```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 ``` </details> ## Steps to reproduce <!-- - Make sure to include full command with parameters you used to run `act`, example: 1. Clone example repo (https://github.com/cplee/github-actions-demo) 2. replace `.github/workflows/main.yaml` with the one above that I provided 3. Run `act` --> ## `act` output <!-- - Use `act` with `-v`/`--verbose` and paste output from your terminal in code block below --> <details> <summary>Log</summary> ```none ... [Repository xxx/myEvent] Starting container: 9403a846d8fa99c60c066cc1b480e0b2039f6d47149122953583cc4abaaed313 | Error: unknown command "yq e --help" for "yq" | Run 'yq --help' for usage. ``` </details> ## Additional information About the usage of the `yq` action, not only [works in Github](https://github.com/search?q=uses%3A+mikefarah%2Fyq&type=Code), you can find the spec here as well, https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runsimage.
Author
Owner

@github-actions[bot] commented on GitHub (Jul 19, 2021):

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

<!-- gh-comment-id:882138031 --> @github-actions[bot] commented on GitHub (Jul 19, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@mattwynne commented on GitHub (Jul 23, 2021):

I'm seeing this too

<!-- gh-comment-id:885929466 --> @mattwynne commented on GitHub (Jul 23, 2021): I'm seeing this too
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#466
No description provided.