[GH-ISSUE #1579] Allow to work with local actions outside of the repository we run the workflows from #792

Open
opened 2026-03-01 21:46:24 +03:00 by kerem · 17 comments
Owner

Originally created by @Porkepix on GitHub (Jan 23, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1579

Act version

act version 0.2.34

Feature description

It would be a nice feature, when developing a new action or more, several actions (for example to migrate from CircleCI's orbs to GitHub's actions) to be able to have like a "path" (I mean, the same way you'd add a location to your $PATH for your shell) act would be looking at/mounting, so that when fetching actions it could also get them from here, to allow for actions development offline and not only the workflows themselves.

Note that I might have missed the way to do so, but the best I could find was to copy and paste actions within the repo itself and change to call from the org/repo syntax to a local one

Originally created by @Porkepix on GitHub (Jan 23, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1579 ### Act version act version 0.2.34 ### Feature description It would be a nice feature, when developing a new action or more, several actions (for example to migrate from CircleCI's orbs to GitHub's actions) to be able to have like a "path" (I mean, the same way you'd add a location to your $PATH for your shell) act would be looking at/mounting, so that when fetching actions it could also get them from here, to allow for actions development offline and not only the workflows themselves. Note that I might have missed the way to do so, but the best I could find was to copy and paste actions within the repo itself and change to call from the `org/repo` syntax to a local one
Author
Owner

@trash-anger commented on GitHub (Feb 11, 2023):

I was about to create quite a similar feature request!

I'm working in a company which have quite a flexible remote work policy leading developers to travel a lot by flight. (which is currently my case)

I'm a new user of act and when I tried to use act during my previous flight I just got this message:
FATA[0000] dial udp 8.8.8.8:80: connect: network is unreachable

So landing I've been wondering how we could work offline an easy way, it could be nice to implement a caching solution allowing to fetch pipeline dependencies while running it. Then running it again would first try to reach online first (and update the cache as a result) and offline, would rely on the cache.

I'm currently adapting the pipelines of my company to get a custom behaviour depending on the GITHUB_ACTIONS var to allow anyone to build locally, and deploy the current component to a local k8s cluster.

I'm thinking out loud:

Another interesting thing would be to implement a similar feature than the ".github" repository. I haven't check if it's possible to make it work with a simlink added to the gitignore tho.

@Porkepix , maybe you could use the workflow reuse function if it works and if you can refactor your pipeline.

<!-- gh-comment-id:1426805038 --> @trash-anger commented on GitHub (Feb 11, 2023): I was about to create quite a similar feature request! I'm working in a company which have quite a flexible remote work policy leading developers to travel a lot by flight. (which is currently my case) I'm a new user of act and when I tried to use act during my previous flight I just got this message: `FATA[0000] dial udp 8.8.8.8:80: connect: network is unreachable` So landing I've been wondering how we could work offline an easy way, it could be nice to implement a caching solution allowing to fetch pipeline dependencies while running it. Then running it again would first try to reach online first (and update the cache as a result) and offline, would rely on the cache. I'm currently adapting the pipelines of my company to get a custom behaviour depending on the `GITHUB_ACTIONS` var to allow anyone to build locally, and deploy the current component to a local k8s cluster. I'm thinking out loud: > Another interesting thing would be to implement a similar feature than the ".github" repository. I haven't check if it's possible to make it work with a simlink added to the gitignore tho. @Porkepix , maybe you could use the workflow reuse function if it works and if you can refactor your pipeline.
Author
Owner

@Porkepix commented on GitHub (Feb 11, 2023):

I was about to create quite a similar feature request!

I'm working in a company which have quite a flexible remote work policy leading developers to travel a lot by flight. (which is currently my case)

I'm a new user of act and when I tried to use act during my previous flight I just got this message: FATA[0000] dial udp 8.8.8.8:80: connect: network is unreachable

So landing I've been wondering how we could work offline an easy way, it could be nice to implement a caching solution allowing to fetch pipeline dependencies while running it. Then running it again would first try to reach online first (and update the cache as a result) and offline, would rely on the cache.

Act actually already cache actions, see ~/.cache/act. The issue here is rather that it tries to reach out Google's Public DNS which is curious to say the least. I noticed it too but didn't opened an issue, would definitely be interesting to know why it does that. And if every resources are available locally then, yes, I believe it should work 100% offline.

What I had in mind was rather to have a clone of the actions repos and to provide them to act like you would with libs given to a compiler, or bineries in your $PATH: a local place to look for those actions.

@Porkepix , maybe you could use the workflow reuse function if it works and if you can refactor your pipeline.

I don't understand what you had in mind here.

<!-- gh-comment-id:1426807729 --> @Porkepix commented on GitHub (Feb 11, 2023): > I was about to create quite a similar feature request! > > I'm working in a company which have quite a flexible remote work policy leading developers to travel a lot by flight. (which is currently my case) > > I'm a new user of act and when I tried to use act during my previous flight I just got this message: `FATA[0000] dial udp 8.8.8.8:80: connect: network is unreachable` > > So landing I've been wondering how we could work offline an easy way, it could be nice to implement a caching solution allowing to fetch pipeline dependencies while running it. Then running it again would first try to reach online first (and update the cache as a result) and offline, would rely on the cache. Act actually already cache actions, see `~/.cache/act`. The issue here is rather that it tries to reach out Google's Public DNS which is curious to say the least. I noticed it too but didn't opened an issue, would definitely be interesting to know why it does that. And if every resources are available locally then, yes, I believe it should work 100% offline. What I had in mind was rather to have a clone of the actions repos and to provide them to act like you would with libs given to a compiler, or bineries in your `$PATH`: a local place to look for those actions. > @Porkepix , maybe you could use the workflow reuse function if it works and if you can refactor your pipeline. I don't understand what you had in mind here.
Author
Owner

@ChristopherHX commented on GitHub (Feb 11, 2023):

@trash-anger Please create a new issue about FATA[0000] dial udp 8.8.8.8:80: connect: network is unreachable

This function should just return 127.0.0.1 on a network error and the artifact server might not work correctly.
github.com/nektos/act@c378a7d28b/pkg/common/outbound_ip.go (L14)

<!-- gh-comment-id:1426851677 --> @ChristopherHX commented on GitHub (Feb 11, 2023): @trash-anger Please create a new issue about `FATA[0000] dial udp 8.8.8.8:80: connect: network is unreachable` This function should just return 127.0.0.1 on a network error and the artifact server might not work correctly. https://github.com/nektos/act/blob/c378a7d28b5c20de9fbb4456544329d04ffb62a4/pkg/common/outbound_ip.go#L14
Author
Owner

@trash-anger commented on GitHub (Feb 11, 2023):

I'm boarding, I'll do that tonight!

<!-- gh-comment-id:1426852779 --> @trash-anger commented on GitHub (Feb 11, 2023): I'm boarding, I'll do that tonight!
Author
Owner

@cardinalby commented on GitHub (Mar 18, 2023):

Act is great for testing Workflows. Developing individual actions I also tried to use act, but found that it's better to have integration tests. Especially for JavaScript actions where you can run your action locally offline, pass intputs, env, etc. and debug it, test its outputs, examine all commands issued by the action, etc.

I use github-action-ts-run-api for that.

<!-- gh-comment-id:1474814115 --> @cardinalby commented on GitHub (Mar 18, 2023): Act is great for testing Workflows. Developing individual actions I also tried to use act, but found that it's better to have integration tests. Especially for JavaScript actions where you can run your action locally offline, pass intputs, env, etc. and **debug** it, test its outputs, examine all commands issued by the action, etc. I use [github-action-ts-run-api](https://github.com/cardinalby/github-action-ts-run-api) for that.
Author
Owner

@mcascone commented on GitHub (Jun 2, 2023):

All I want is to be able to develop my actions locally, separate from the repo with the workflow file that calls them.

Specifically, I want to be able to use a local path in the uses: part of a workflow:

Existing behavior

jobs:
  Deploy:
    steps:
      - uses: 'myOrg/my-action@my-branch'

Desired functionality

jobs:
  Deploy:
    steps:
      - uses: '/path/to/local/my-action@my-branch'

Going by the output, there would need to be a trigger or flag to not tack the https://github.com onto the path:

 git clone 'https://github.com/~/myOrg' # ref=my-branch
[My-Action/Deploy] Unable to clone https://github.com/~/myOrg refs/heads/my-branch: repository not found
<!-- gh-comment-id:1574290406 --> @mcascone commented on GitHub (Jun 2, 2023): All I want is to be able to develop my actions locally, separate from the repo with the workflow file that calls them. Specifically, I want to be able to use a local path in the `uses:` part of a workflow: ## Existing behavior ```yaml jobs: Deploy: steps: - uses: 'myOrg/my-action@my-branch' ``` ## Desired functionality ```yaml jobs: Deploy: steps: - uses: '/path/to/local/my-action@my-branch' ``` ## Going by the output, there would need to be a trigger or flag to not tack the `https://github.com` onto the path: ```sh git clone 'https://github.com/~/myOrg' # ref=my-branch [My-Action/Deploy] Unable to clone https://github.com/~/myOrg refs/heads/my-branch: repository not found ```
Author
Owner

@mverkerk-godaddy commented on GitHub (Aug 16, 2023):

I'm struggling with this too - I'm building a library of actions that can be shared across repos within our github org and when I'm testing this library locally with ACT, the uses: pieces should point to .[/path] where otherwise, they should point to {org}/{repo}[/path]@ref ...

Currently, I have to (temporarily) update everything from {org}/{repo}[/path]@ref to .[/path], run ACT, and change everything back before I commit/push (easy to forget). I have written a bash script that takes care of this but that's not ideal. I'll include the script at the bottom of this message...

In my testing, I have tried setting an ENV variable and/or using env.ACT but unfortunately uses: does not support variables (as far as I know)

This example:

- uses: ${{ env.ACT && './.github/actions/my-action' || 'org/repo/.github/actions/my-action@main' }}
  with:
    some-input: input

... failed with this error:

Error: Expected format {org}/{repo}[/path]@ref. Actual '${{ env.ACT && './.github/actions/my-action' || 'my-org/my-repo/.github/actions/my-action@main' }}' Input string was not in a correct format

would be great if there was a flag like --replace-ghe-path-with-local {org}/{repo} that would make this switch for us!

btw: thanks for all the great work! really enjoying this tool! 👍🏼

Here's my act_path_replace.sh script:

#!/usr/bin/env bash
target=${1}

if [ "$target" == "--to-remote" ]; then
  echo "Updating [action.yml] files to point to [org/repo/.github/actions]"
  FILES=$(find . -name "action.yml" -type f -exec grep -l "uses:.*\.\/\.github\/actions\/" {} \;)
  for file in $FILES; do
    sed -i 's|./.github/actions|org/repo/.github/actions|g' "$file"
    sed -i '/uses:.*\.github\/actions\//!b;/@v2/b;s/$/@v2/' "$file"
  done
elif [ "$target" == "--to-local" ]; then
  echo "Updating [action.yml] files to point to [./.github/actions]"
  FILES=$(find . -name "action.yml" -type f -exec grep -l "uses:.*org\/repo\/\.github\/actions\/" {} \;)
  for file in $FILES; do
    sed -i 's|org/repo|.|g' "$file"
    sed -i 's|@v2$||g' "$file"
  done
else
  echo "Please specify a target: local or remote"
  exit 1
fi

<!-- gh-comment-id:1680691579 --> @mverkerk-godaddy commented on GitHub (Aug 16, 2023): I'm struggling with this too - I'm building a library of actions that can be shared across repos within our github org and when I'm testing this library locally with ACT, the `uses: ` pieces should point to `.[/path]` where otherwise, they should point to `{org}/{repo}[/path]@ref` ... Currently, I have to (temporarily) update everything from `{org}/{repo}[/path]@ref` to `.[/path]`, run ACT, and change everything back before I commit/push (easy to forget). I have written a bash script that takes care of this but that's not ideal. I'll include the script at the bottom of this message... In my testing, I have tried setting an ENV variable and/or using `env.ACT` but unfortunately `uses: ` does not support variables (as far as I know) This example: ``` - uses: ${{ env.ACT && './.github/actions/my-action' || 'org/repo/.github/actions/my-action@main' }} with: some-input: input ``` ... failed with this error: `Error: Expected format {org}/{repo}[/path]@ref. Actual '${{ env.ACT && './.github/actions/my-action' || 'my-org/my-repo/.github/actions/my-action@main' }}' Input string was not in a correct format` would be great if there was a flag like `--replace-ghe-path-with-local {org}/{repo}` that would make this switch for us! btw: thanks for all the great work! really enjoying this tool! 👍🏼 Here's my `act_path_replace.sh` script: ```bash #!/usr/bin/env bash target=${1} if [ "$target" == "--to-remote" ]; then echo "Updating [action.yml] files to point to [org/repo/.github/actions]" FILES=$(find . -name "action.yml" -type f -exec grep -l "uses:.*\.\/\.github\/actions\/" {} \;) for file in $FILES; do sed -i 's|./.github/actions|org/repo/.github/actions|g' "$file" sed -i '/uses:.*\.github\/actions\//!b;/@v2/b;s/$/@v2/' "$file" done elif [ "$target" == "--to-local" ]; then echo "Updating [action.yml] files to point to [./.github/actions]" FILES=$(find . -name "action.yml" -type f -exec grep -l "uses:.*org\/repo\/\.github\/actions\/" {} \;) for file in $FILES; do sed -i 's|org/repo|.|g' "$file" sed -i 's|@v2$||g' "$file" done else echo "Please specify a target: local or remote" exit 1 fi ```
Author
Owner

@ChristopherHX commented on GitHub (Aug 16, 2023):

Please test this version of act https://github.com/ChristopherHX/act/pull/34.

Usage: ./act --local-repository "https://github.com/test/test@v0=$PWD" -W test.yml -P self-hosted=-self-hosted -v

on: push
jobs:
  _:
    runs-on: self-hosted
    steps:
    - uses: test/test@v0

action.yml in cwd

runs:
  using: composite
  steps:
  - run: echo Test

I need reviewer for https://github.com/nektos/act/pull/1954, because --local-repository is based on that code.

<!-- gh-comment-id:1680953095 --> @ChristopherHX commented on GitHub (Aug 16, 2023): Please test this version of act https://github.com/ChristopherHX/act/pull/34. Usage: `./act --local-repository "https://github.com/test/test@v0=$PWD" -W test.yml -P self-hosted=-self-hosted -v` ```yaml on: push jobs: _: runs-on: self-hosted steps: - uses: test/test@v0 ``` action.yml in cwd ```yaml runs: using: composite steps: - run: echo Test ``` I need reviewer for https://github.com/nektos/act/pull/1954, because `--local-repository` is based on that code.
Author
Owner

@reneleonhardt commented on GitHub (May 1, 2024):

Please test this version of act ChristopherHX#34.

Why was it closed after #1954 has been merged? 🤔

<!-- gh-comment-id:2087956994 --> @reneleonhardt commented on GitHub (May 1, 2024): > Please test this version of act [ChristopherHX#34](https://github.com/ChristopherHX/act/pull/34). Why was it closed after #1954 has been merged? 🤔
Author
Owner

@ChristopherHX commented on GitHub (May 1, 2024):

Why was it closed after https://github.com/nektos/act/pull/1954 has been merged? 🤔

Summary It was the wrong target repository and was used to keep it via GitHub UI uptodate.

Actually this has been merged by now, see act --help.

Since nobody has ever commented between our comments, I forget this issue exists. Please evaluate if this can be closed

<!-- gh-comment-id:2088678654 --> @ChristopherHX commented on GitHub (May 1, 2024): > Why was it closed after https://github.com/nektos/act/pull/1954 has been merged? 🤔 Summary It was the wrong target repository and was used to keep it via GitHub UI uptodate. Actually this has been merged by now, see `act --help`. Since nobody has ever commented between our comments, I forget this issue exists. Please evaluate if this can be closed
Author
Owner

@mcascone commented on GitHub (May 1, 2024):

is there any documentation on this other than the help text?

 --local-repository stringArray                      

Replaces the specified repository and ref with a local folder 

e.g. https://github.com/test/test@v0=/home/act/test or test/test@v0=/home/act/test, 
the latter matches any hosts or protocols
<!-- gh-comment-id:2088697186 --> @mcascone commented on GitHub (May 1, 2024): is there any documentation on this other than the help text? ``` --local-repository stringArray Replaces the specified repository and ref with a local folder e.g. https://github.com/test/test@v0=/home/act/test or test/test@v0=/home/act/test, the latter matches any hosts or protocols ```
Author
Owner

@ChristopherHX commented on GitHub (May 1, 2024):

Some more details here: https://github.com/nektos/act/pull/2155#issue-2088646390

Usage: ./act --local-repository "https://github.com/test/test@v0=$PWD" -W test.yml -P self-hosted=-self-hosted -v

Now also possible ./act --local-repository "test/test@v0=$PWD" -W test.yml -P self-hosted=-self-hosted -v

on: push
jobs:
  _:
    runs-on: self-hosted
    steps:
    - uses: test/test@v0

action.yml in cwd

runs:
  using: composite
  steps:
  - run: echo Test
<!-- gh-comment-id:2088749639 --> @ChristopherHX commented on GitHub (May 1, 2024): Some more details here: <https://github.com/nektos/act/pull/2155#issue-2088646390> Usage: `./act --local-repository "https://github.com/test/test@v0=$PWD" -W test.yml -P self-hosted=-self-hosted -v` Now also possible `./act --local-repository "test/test@v0=$PWD" -W test.yml -P self-hosted=-self-hosted -v` ```yaml on: push jobs: _: runs-on: self-hosted steps: - uses: test/test@v0 ``` action.yml in cwd ```yaml runs: using: composite steps: - run: echo Test ```
Author
Owner

@reneleonhardt commented on GitHub (May 6, 2024):

@Porkepix Is your use case now possible?

I can't see from this --local-repository example if mcascone's intuitive feature request https://github.com/nektos/act/issues/1579#issuecomment-1574290406 works when replacing $PWD by the actual absolute path to the local test/test repo... if it's outside of $PWD 😅

<!-- gh-comment-id:2095314532 --> @reneleonhardt commented on GitHub (May 6, 2024): @Porkepix Is your use case now possible? I can't see from this --local-repository example if mcascone's intuitive feature request https://github.com/nektos/act/issues/1579#issuecomment-1574290406 works when replacing $PWD by the actual absolute path to the local `test/test` repo... if it's outside of $PWD 😅
Author
Owner

@ChristopherHX commented on GitHub (May 6, 2024):

mcascone's intuitive feature request

That won't work and I don't agree with accepting yaml that GitHub Actions doesn't like to see. You would need to find someone else supporting such an idea, I'm not an owner of this project.

You should make shure it's an absolute path. If it's relative, I guarantee nothing and it could just fail.
E.g. $PWD is really just a bash variable for an absolute path, there are no sanity checks

This is what you should be able to get working based on the referenced comment

jobs:
  Deploy:
    steps:
      - uses: 'myOrg/my-action@my-branch'

act --local-repository myOrg/my-action@my-branch=/path/to/local/my-action and /path/to/local/my-action is created by git clone myOrg/my-action -b my-branch my-action within /path/to/local/. So /path/to/local/my-action contains the .git dir and it's action.yml file.

Feel free to come back to me with any error, --local-repository is an feature flag it implies changing how actions are cloned

If you want to apply this automatically without adding the arg everytime create a ./.actrc file like (don't use any ", as this just do a split on the first space)

--local-repository myOrg/my-action@my-branch=/path/to/local/my-action

You might be using this Software more often than I, even if I contributed more code

<!-- gh-comment-id:2096917859 --> @ChristopherHX commented on GitHub (May 6, 2024): > mcascone's intuitive feature request That won't work and I don't agree with accepting yaml that GitHub Actions doesn't like to see. You would need to find someone else supporting such an idea, I'm not an owner of this project. You should make shure it's an absolute path. If it's relative, I guarantee nothing and it could just fail. E.g. `$PWD` is really just a bash variable for an absolute path, there are no sanity checks This is what you should be able to get working based on the referenced comment ```yaml jobs: Deploy: steps: - uses: 'myOrg/my-action@my-branch' ``` `act --local-repository myOrg/my-action@my-branch=/path/to/local/my-action` and `/path/to/local/my-action` is created by `git clone myOrg/my-action -b my-branch my-action` within `/path/to/local/`. So `/path/to/local/my-action` contains the `.git` dir and it's action.yml file. Feel free to come back to me with any error, `--local-repository` is an feature flag it implies changing how actions are cloned If you want to apply this automatically without adding the arg everytime create a `./.actrc` file like (don't use any `"`, as this just do a split on the first space) ``` --local-repository myOrg/my-action@my-branch=/path/to/local/my-action ``` _You might be using this Software more often than I, even if I contributed more code_
Author
Owner

@ChristopherHX commented on GitHub (May 6, 2024):

The error messages if the folder/file doesn't exist are bad and only the myOrg/my-action@my-branch part shows up together with the tried file names

This is what I mean, maybe it makes sense to log more about the hidden source of the action, the default implied by --local-repository is also to use bare git clones of actions.

Error: failed to read 'action.yml' from action 'myOrg/my-action@my-branch' with path '' of step file does not exist
failed to read 'action.yaml' from action 'myOrg/my-action@my-branch' with path '' of step file does not exist
failed to read 'Dockerfile' from action 'myOrg/my-action@my-branch' with path '' of step file does not exist

To be honest using act might be really complicated by now with all it's cli flags and weird error messages

<!-- gh-comment-id:2096953196 --> @ChristopherHX commented on GitHub (May 6, 2024): The error messages if the folder/file doesn't exist are bad and only the `myOrg/my-action@my-branch` part shows up together with the tried file names This is what I mean, maybe it makes sense to log more about the hidden source of the action, the default implied by `--local-repository` is also to use bare git clones of actions. ``` Error: failed to read 'action.yml' from action 'myOrg/my-action@my-branch' with path '' of step file does not exist failed to read 'action.yaml' from action 'myOrg/my-action@my-branch' with path '' of step file does not exist failed to read 'Dockerfile' from action 'myOrg/my-action@my-branch' with path '' of step file does not exist ``` _To be honest using act might be really complicated by now with all it's cli flags and weird error messages_
Author
Owner

@jsoref commented on GitHub (Nov 4, 2024):

I was going to file a new issue for https://github.com/check-spelling-sandbox/nektos-act-issue-up-dir/actions/runs/11671555945 not working in act, but this issue technically is the right issue.

Summary:

  1. The GitHub Actions Runtime does allow paths outside the checkout directory, specifically using a syntax of ./../ (and presumably more than that, but whatever).
  2. github/codeql-action heavily uses this feature.
  3. For check-spelling, instead of using that feature (because I didn't find it), I'm leaving my action shims within .git/, but it would be much cleaner if I could leave them in ./../ instead.

.github/workflows/test.yml:

on:
  push:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - run: |
        mkdir ../action
        mv * ../action
    - uses: ./../action

action.yml

runs:
  using: node20
  main: main.js

main.js

console.log("hello world")

GitHub

Run mkdir ../action
Run ./../action
hello world

Act

[test.yml/test] ⭐ Run Main actions/checkout@v4
[test.yml/test]   🐳  docker cp src=/Users/jsoref/code/nektos/issues/up-dir/. dst=/Users/jsoref/code/nektos/issues/up-dir
[test.yml/test]   ✅  Success - Main actions/checkout@v4
[test.yml/test] ⭐ Run Main mkdir ../action
mv * ../action
[test.yml/test]   🐳  docker exec cmd=[bash -e /var/run/act/workflow/1] user= workdir=
[test.yml/test]   ✅  Success - Main mkdir ../action
mv * ../action
[test.yml/test] ⭐ Run Main ./../action
[test.yml/test]   ❌  Failure - Main ./../action
[test.yml/test] failed to read 'action.yml' from action './../action' with path '' of step file does not exist
failed to read 'action.yaml' from action './../action' with path '' of step file does not exist
failed to read 'Dockerfile' from action './../action' with path '' of step file does not exist
[test.yml/test] 🏁  Job failed
Error: Job 'test' failed
<!-- gh-comment-id:2455650040 --> @jsoref commented on GitHub (Nov 4, 2024): I was going to file a new issue for https://github.com/check-spelling-sandbox/nektos-act-issue-up-dir/actions/runs/11671555945 not working in act, but this issue _technically_ is the right issue. Summary: 1. The GitHub Actions Runtime **does** allow paths outside the checkout directory, specifically using a syntax of `./../` (and presumably more than that, but whatever). 2. [github/codeql-action](https://github.com/github/codeql-action/) [heavily uses this feature](https://github.com/search?q=repo%3Agithub%2Fcodeql-action%20.%2F..%2F&type=code). 3. For check-spelling, instead of using that feature (because I didn't find it), I'm leaving my [action shims within `.git/`](https://github.com/search?q=repo%3Acheck-spelling%2Fcheck-spelling%20check-spelling-actions%20&type=code), but it would be much cleaner if I could leave them in `./../` instead. [`.github/workflows/test.yml`](https://github.com/check-spelling-sandbox/nektos-act-issue-up-dir/blob/4e633baa77d08a18f3dcbf56f420e7279ac83e93/.github/workflows/test.yml): ```yaml on: push: jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - run: | mkdir ../action mv * ../action - uses: ./../action ``` [`action.yml`](https://github.com/check-spelling-sandbox/nektos-act-issue-up-dir/blob/4e633baa77d08a18f3dcbf56f420e7279ac83e93/action.yml) ```yml runs: using: node20 main: main.js ``` [`main.js`](https://github.com/check-spelling-sandbox/nektos-act-issue-up-dir/blob/4e633baa77d08a18f3dcbf56f420e7279ac83e93/main.js) ```js console.log("hello world") ``` # [GitHub](https://github.com/check-spelling-sandbox/nektos-act-issue-up-dir/actions/runs/11671555945/job/32498209442#step:4:3) ```shell Run mkdir ../action Run ./../action hello world ``` # Act ```shell [test.yml/test] ⭐ Run Main actions/checkout@v4 [test.yml/test] 🐳 docker cp src=/Users/jsoref/code/nektos/issues/up-dir/. dst=/Users/jsoref/code/nektos/issues/up-dir [test.yml/test] ✅ Success - Main actions/checkout@v4 [test.yml/test] ⭐ Run Main mkdir ../action mv * ../action [test.yml/test] 🐳 docker exec cmd=[bash -e /var/run/act/workflow/1] user= workdir= [test.yml/test] ✅ Success - Main mkdir ../action mv * ../action [test.yml/test] ⭐ Run Main ./../action [test.yml/test] ❌ Failure - Main ./../action [test.yml/test] failed to read 'action.yml' from action './../action' with path '' of step file does not exist failed to read 'action.yaml' from action './../action' with path '' of step file does not exist failed to read 'Dockerfile' from action './../action' with path '' of step file does not exist [test.yml/test] 🏁 Job failed Error: Job 'test' failed ```
Author
Owner

@ChristopherHX commented on GitHub (Nov 4, 2024):

You mean this: https://github.com/nektos/act/pull/2108 that has an dedicated issue for this.

I refused to give my approval (+0/neutral), but I wouldn't block it if I'm overvoted by maintainers.

<!-- gh-comment-id:2455771518 --> @ChristopherHX commented on GitHub (Nov 4, 2024): You mean this: https://github.com/nektos/act/pull/2108 that has an dedicated issue for this. I refused to give my approval (+0/neutral), but I wouldn't block it if I'm overvoted by maintainers.
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#792
No description provided.