act: [BUG] Can't use yarn

Whenever I try to call any yarn command the act returns an error and fails to execute: Failed to replace env in config: ${{ inputs.auth-token }. I tried to search trough existing issues, over the internet and nothing with this exact error pops up.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 17
  • Comments: 15 (2 by maintainers)

Most upvoted comments

I had the same problem but resolved it by switching to the Large image during act first-run.

You can do this be deleting ~/.actrc then run act again.

@chetbox yarn is not installed in the “slim” version. You can easily run npm i -g yarn as a separate step if you don’t want to have 18Gb of Images on your PC 😄 However I think this is not related to this issue.

I had to use ubuntu:js-latest instead of default ubuntu:act-latest. Here is where I noticed that the first one includes yarn as well: https://hub.docker.com/r/catthehacker/ubuntu.

Thanks for this! Just want to add that this is done with the -P or --platform flag since this wasn’t immediately clear to me. This flag allows you to map the runs-on value to an image. Example mapping ubuntu-latest to ubuntu:js-latest:

act pull_request -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-latest

I had to use ubuntu:js-latest instead of default ubuntu:act-latest. Here is where I noticed that the first one includes yarn as well: https://hub.docker.com/r/catthehacker/ubuntu.

Thanks for this! Just want to add that this is done with the -P or --platform flag since this wasn’t immediately clear to me. This flag allows you to map the runs-on value to an image. Example mapping ubuntu-latest to ubuntu:js-latest:

act pull_request -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:js-latest

Oddly, this didn’t work for me, today. So I had to use -P ubuntu-latest=node:14

I had to use ubuntu:js-latest instead of default ubuntu:act-latest. Here is where I noticed that the first one includes yarn as well: https://hub.docker.com/r/catthehacker/ubuntu.

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

One can replace .../catthehacker/ubuntu:act-latest with .../catthehacker/ubuntu:js-latest in the .actrc file - then one does not need to specify it everytime.

Have you guys found a solution?

I didn’t. I ended up not using this tool 😦