Skip to content

action: make working-directory optional - #25

Open
thaJeztah wants to merge 1 commit into
containerd:mainfrom
thaJeztah:no_workdir
Open

action: make working-directory optional#25
thaJeztah wants to merge 1 commit into
containerd:mainfrom
thaJeztah:no_workdir

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

The action currently sets GOPATH to github.workspace to make its installed helper commands available. This causes projects checked out at the workspace root to fail with "$GOPATH/go.mod exists but should not", forcing callers to use a legacy GOPATH-style checkout path.

Install the helper commands in a dedicated directory under runner.temp and add that directory to PATH without modifying the caller's GOPATH.

Default working-directory to "." so projects using a standard root checkout do not need to configure it, while retaining support for projects located in a subdirectory.

The action currently sets GOPATH to github.workspace to make its
installed helper commands available. This causes projects checked out at
the workspace root to fail with "$GOPATH/go.mod exists but should not",
forcing callers to use a legacy GOPATH-style checkout path.

Install the helper commands in a dedicated directory under runner.temp
and add that directory to PATH without modifying the caller's GOPATH.

Default working-directory to "." so projects using a standard root
checkout do not need to configure it, while retaining support for
projects located in a subdirectory.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
thaJeztah added a commit to thaJeztah/go-runc that referenced this pull request Aug 22, 2026
testing containerd/project-checks#25

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

Copy link
Copy Markdown
Member Author

Comment thread action.yml
#
# steps:
# - uses: actions/setup-go@v3
# - uses: actions/checkout@v7

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be irrelevant changes

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes; I wanted to make sure the example use was correct, and setup-go uses state of the branch as default (at least go.mod) which is why it swapped the order; as the line was now modified, als updated to something more current.

Let me know if you want me to revert and move separate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants