Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go-version-file not respecting defaults.run.working-directory #419

Closed
2 of 5 tasks
nickzelei opened this issue Aug 25, 2023 · 4 comments
Closed
2 of 5 tasks

go-version-file not respecting defaults.run.working-directory #419

nickzelei opened this issue Aug 25, 2023 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@nickzelei
Copy link

nickzelei commented Aug 25, 2023

Description:
I am running inside a mono-repo and have a job that sets the default working directory to a folder.
The go-version-file is set to point to go.mod, but it cannot find it unless I specify the go-version-file to also include the working directory.

Action version:
Specify the action version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

1.21

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.
I've setup an example repo that reproduces this.
I have two jobs, both set the default working dir, one does not set the path in go-version-file, the other does.
nickzelei/goversion-workdir#1
https://github.com/nickzelei/goversion-workdir/actions/runs/5980795503

Note, the sub directory and presence of go.work is intentional here. My main repository is a mono-repo with multiple go projects in sub-directories.
I have different jobs that trigger based on sub-paths changed and use the working dir here so they can operate in isolation.

Expected behavior:
The working directory should be honored.

Actual behavior:
The setup action is failing claiming it can't find the go.mod file. However, if you add a step and ls- l the directory, it is clearly there.

@nickzelei nickzelei added bug Something isn't working needs triage labels Aug 25, 2023
@nickzelei
Copy link
Author

Perhaps I'm making an assumption that I shouldn't be. Github Actions says that it is run any step that uses run. I assumed that eventually all action steps invoked run, but maybe that is incorrect, and specifying the workdir for this step is intentional.

If so, I can close this issue.

@dsame
Copy link
Contributor

dsame commented Aug 28, 2023

Hello @nickzelei , thanks for the note, we are starting to investigate the problem.

@dsame dsame self-assigned this Aug 28, 2023
@dsame
Copy link
Contributor

dsame commented Aug 28, 2023

Hello @nickzelei , you are right: this configuration relates only to run step.

Did this answer help?

@dsame dsame added question Further information is requested and removed bug Something isn't working labels Aug 28, 2023
@nickzelei
Copy link
Author

I think so, yea. I'll go ahead and close this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants