[GH-ISSUE #361] Improper parsing of action entrypoint #255

Closed
opened 2026-03-01 21:41:49 +03:00 by kerem · 5 comments
Owner

Originally created by @dfreilich on GitHub (Sep 8, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/361

I'm developing a Github Action, and when I try to have something like:

runs:
...
  entrypoint: "./entrypoint.sh"

act complains because

Error: yaml: unmarshal errors:
  line 9: cannot unmarshal !!str `./entry...` into []string

This seems to be against Github's own parser, however - for it failed on Github Actions when I wrapping my entrypoint in an array. (see here)

$  act --version
act version 0.2.14
Originally created by @dfreilich on GitHub (Sep 8, 2020). Original GitHub issue: https://github.com/nektos/act/issues/361 I'm developing a Github Action, and when I try to have something like: ``` runs: ... entrypoint: "./entrypoint.sh" ``` `act` complains because ``` Error: yaml: unmarshal errors: line 9: cannot unmarshal !!str `./entry...` into []string ``` This seems to be against Github's own parser, however - for it failed on Github Actions when I wrapping my entrypoint in an array. (see [here](https://github.com/dfreilich/pack-action/actions/runs/244469398)) ``` $ act --version act version 0.2.14 ```
kerem 2026-03-01 21:41:49 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Nov 8, 2020):

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

<!-- gh-comment-id:723512996 --> @github-actions[bot] commented on GitHub (Nov 8, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Author
Owner

@ShahradR commented on GitHub (Nov 14, 2020):

Oh, I ran into this issue too! I'm definitely not an expert in either Go or C#, but I think the difference in implementation between the two runners can be found here:

I ended up using a custom Dockerfile in my action, sidestepping the issue, but I did some analysis in ShahradR/action-taskcat#26. Hopefully that helps a bit?

Here are the details for my run (it's been a while, so I was on an older version of act when I ran this, but I can set it up on the latest version if it helps!)

Questions Answers
Version 0.2.10
Platform Ubuntu 20.04.1 LTS running in WSL 2
main.workflow file used See action.yaml file in ShahradR/action-taskcat
The complete command that was executed Action was ran using the GitHub runner
Any output from the command See ShahradR/action-taskcat#26
Details of the expected result See ShahradR/action-taskcat#26
<!-- gh-comment-id:727136723 --> @ShahradR commented on GitHub (Nov 14, 2020): Oh, I ran into this issue too! I'm definitely not an expert in either Go or C#, but I think the difference in implementation between the two runners can be found here: - [GitHub Runner expecting `string`](https://github.com/actions/runner/blob/5e0cde8649bdd72fd9659b10253a7fbf5dbc43c1/src/Runner.Worker/ActionManifestManager.cs#L398) - [act expecting `string[]`](https://github.com/nektos/act/blob/6d6ea7ac04cc9810ef58dba094a56c16681396a8/pkg/model/action.go#L53) I ended up using a custom Dockerfile in my action, sidestepping the issue, but I did some analysis in ShahradR/action-taskcat#26. Hopefully that helps a bit? Here are the details for my run (it's been a while, so I was on an older version of act when I ran this, but I can set it up on the latest version if it helps!) | Questions | Answers | | :-------------------------------------- | :------- | | Version | 0.2.10 | | Platform | Ubuntu 20.04.1 LTS running in WSL 2 | | `main.workflow` file used | [See `action.yaml` file in ShahradR/action-taskcat](https://github.com/ShahradR/action-taskcat/blob/e0980da77e64b7fcdb5e206035dcf727010f9764/action.yaml#L24-L27) | | The complete command that was executed | Action was ran using the GitHub runner | | Any output from the command | See ShahradR/action-taskcat#26 | | Details of the expected result | See ShahradR/action-taskcat#26 |
Author
Owner

@github-actions[bot] commented on GitHub (Jan 14, 2021):

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

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

@donovanmuller commented on GitHub (Jan 16, 2021):

Also facing this issue using https://github.com/dflook/terraform-github-actions

E.g. workflow:

jobs:
  test:
    runs-on: ubuntu-latest
    name: Test
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Use branch workspace
        uses: dflook/terraform-new-workspace@v1
        with:
          path: infrastructure/eks
          workspace: test

results in:

$ act --version
act version 0.2.18

$ act -b -j test
[Test/Test] 🚀  Start image=node:12.6-buster-slim
[Test/Test]   🐳  docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[]
[Test/Test] ⭐  Run Checkout
[Test/Test]   ✅  Success - Checkout
[Test/Test] ⭐  Run Use branch workspace
[Test/Test]   ☁  git clone 'https://github.com/dflook/terraform-new-workspace' # ref=v1
[Test/Test]   ❌  Failure - Use branch workspace
Error: yaml: unmarshal errors:
  line 22: cannot unmarshal !!str `/entryp...` into []string

from here:

runs:
  using: docker
  image: ../image/Dockerfile
  entrypoint: /entrypoints/new-workspace.sh

this obviously works when used in an actual run.

<!-- gh-comment-id:761625867 --> @donovanmuller commented on GitHub (Jan 16, 2021): Also facing this issue using https://github.com/dflook/terraform-github-actions E.g. workflow: ```yaml jobs: test: runs-on: ubuntu-latest name: Test steps: - name: Checkout uses: actions/checkout@v2 - name: Use branch workspace uses: dflook/terraform-new-workspace@v1 with: path: infrastructure/eks workspace: test ``` results in: ```console $ act --version act version 0.2.18 $ act -b -j test [Test/Test] 🚀 Start image=node:12.6-buster-slim [Test/Test] 🐳 docker run image=node:12.6-buster-slim entrypoint=["/usr/bin/tail" "-f" "/dev/null"] cmd=[] [Test/Test] ⭐ Run Checkout [Test/Test] ✅ Success - Checkout [Test/Test] ⭐ Run Use branch workspace [Test/Test] ☁ git clone 'https://github.com/dflook/terraform-new-workspace' # ref=v1 [Test/Test] ❌ Failure - Use branch workspace Error: yaml: unmarshal errors: line 22: cannot unmarshal !!str `/entryp...` into []string ``` from [here](https://github.com/dflook/terraform-github-actions/blob/4ad456ba906a3b45206dbb7448ad4ada011e1568/terraform-new-workspace/action.yaml#L19-L22): ```yaml runs: using: docker image: ../image/Dockerfile entrypoint: /entrypoints/new-workspace.sh ``` this obviously works when used in an actual run.
Author
Owner

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

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

<!-- gh-comment-id:781725506 --> @github-actions[bot] commented on GitHub (Feb 19, 2021): Issue is stale and will be closed in 14 days unless there is new activity
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#255
No description provided.