mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #1982] defaults.run.working-directory option not being respected #951
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#951
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @luisaveiro on GitHub (Aug 22, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1982
Bug report info
Command used with act
Describe issue
When using GitHub Actions defaults.run.working-directory, act doesn't apply the
working-directoryas workdir.act is running on the following directory:
The GitHub Actions workflow defined the working-directory to be
/.code.Link to GitHub repository
No response
Workflow content
Relevant log output
Additional information
No response
@ChristopherHX commented on GitHub (Aug 22, 2023):
Sorry but this open source project is not for requesting features for the GitHub Actions platform.
I want to remind you, what you are doing here is not respected by the official GitHub Actions Runner
In short the key is not named defaults.uses.working-directory, to imply it applies to steps with
runkey.@luisaveiro commented on GitHub (Aug 23, 2023):
@ChristopherHX thank you for your response. I might not have articulated my message correctly. I'm sorry for any confusion.
I have a GitHub Actions workflow I'm trying to validate & test locally using the Act tool. I'm experiencing a behavioural issue with Act not respecting the GitHub Actions syntax option for
jobs.<job_id>.defaults.run.working-directory.According to GitHub Actions documentation
Example: Set the default working directory
My GitHub Actions workflow does work with GitHub as expected. I was under the impression that the Act tool supported the entire GitHub Actions syntax options.
@ChristopherHX commented on GitHub (Aug 23, 2023):
But "Main Use Node.js 18.x" is a nodejs action and not a run step, how does that work on GitHub?
The source code of actions runner ignores any attempt to change the working-directory of
and so does act.
@luisaveiro commented on GitHub (Aug 24, 2023):
@ChristopherHX I found the issue. I modified the GitHub Actions incorrectly while testing with the Act tool. I moved the
defaults.run.working-directoryoption outside of thejobs.build. I reverted this change and the GitHub Actions is working with the Act tool. Thanks for your support.