I think + string(filepath.Separator) at the end of the string is important, it were missing and local actions stopped working.
Have you tested an action with uses: ./ or uses: ./myaction/sub?
// On Linux, Workdir will be like "/<owner>/<repo>/"
Otherwise act has to be patched to resolve local actions without a / or \ at the end correctly.
I think `+ string(filepath.Separator)` at the end of the string is important, it were missing and local actions stopped working.
Have you tested an action with `uses: ./` or `uses: ./myaction/sub`?
`// On Linux, Workdir will be like "/<owner>/<repo>/"`
Otherwise act has to be patched to resolve local actions without a / or \ at the end correctly.
@ChristopherHX Hi, I just tested a local action and I found it works well. In my test, I didn't append the string(filepath.Separator) at the end of Workdir so the Workdir is /<owner>/<repo>
@ChristopherHX Hi, I just tested a local action and I found it works well. In my test, I didn't append the `string(filepath.Separator)` at the end of `Workdir` so the `Workdir` is `/<owner>/<repo>`
My directory structure is:
```
├── actions
│ └── my-action
│ ├── action.yml
│ └── index.js
├── .gitea
│ └── workflows
│ └── my-workflow.yml
└── README.md
```
and the `my-workflow.yml` is:
``` yml
name: 'My Workflow'
on: [push]
jobs:
my-job:
runs-on: ubuntu-latest
steps:
- uses: https://github.com/actions/checkout@v3
- name: 'My Step'
uses: './actions/my-action'
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fix #56
This PR uses the
preset.Repositoryas a part of the workdir and usefilepath.FromSlashto convert the slash characters.@@ -0,0 +214,4 @@config := &runner.Config{// On Linux, Workdir will be like "/<owner>/<repo>"// On Windows, Workdir will be like "\<owner>\<repo>"Workdir: filepath.FromSlash(string(filepath.Separator) + preset.Repository),I think
+ string(filepath.Separator)at the end of the string is important, it were missing and local actions stopped working.Have you tested an action with
uses: ./oruses: ./myaction/sub?// On Linux, Workdir will be like "/<owner>/<repo>/"Otherwise act has to be patched to resolve local actions without a / or \ at the end correctly.
@@ -0,0 +214,4 @@config := &runner.Config{// On Linux, Workdir will be like "/<owner>/<repo>"// On Windows, Workdir will be like "\<owner>\<repo>"Workdir: filepath.FromSlash(string(filepath.Separator) + preset.Repository),Sorry, I haven't tested local actions and I will make one then test it. Thanks for your review!
@ChristopherHX Hi, I just tested a local action and I found it works well. In my test, I didn't append the
string(filepath.Separator)at the end ofWorkdirso theWorkdiris/<owner>/<repo>My directory structure is:
and the
my-workflow.ymlis:Seems like you are right, there is no such problem on linux.