[PR #567] [MERGED] Use project dir instead of /github/workspace #1500

Closed
opened 2026-03-01 21:51:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/567
Author: @rockandska
Created: 3/15/2021
Status: Merged
Merged: 3/29/2021
Merged by: @cplee

Base: masterHead: fix/use_project_dir


📝 Commits (1)

  • 1e1a7b2 use project dir instead of /github/workspace

📊 Changes

4 files changed (+20 additions, -21 deletions)

View changed files

📝 pkg/runner/run_context.go (+9 -10)
📝 pkg/runner/step_context.go (+6 -6)
📝 pkg/runner/testdata/basic/push.yml (+2 -2)
📝 pkg/runner/testdata/workdir/push.yml (+3 -3)

📄 Description

As stated here, there is no guaranty that /github will be the directory used and actions should not use hard coded /github but use the equivalent env var instead.

Using the project dir allow us to mimic this case and in the same way allow users to mount the project dir from inside the container without problem.

Solve #555
Should works for #551 / #410 too

Also, running go run main.go run successfully now.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/567 **Author:** [@rockandska](https://github.com/rockandska) **Created:** 3/15/2021 **Status:** ✅ Merged **Merged:** 3/29/2021 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `fix/use_project_dir` --- ### 📝 Commits (1) - [`1e1a7b2`](https://github.com/nektos/act/commit/1e1a7b287d29fec20beea9c28b01552bc1ac17f7) use project dir instead of /github/workspace ### 📊 Changes **4 files changed** (+20 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/run_context.go` (+9 -10) 📝 `pkg/runner/step_context.go` (+6 -6) 📝 `pkg/runner/testdata/basic/push.yml` (+2 -2) 📝 `pkg/runner/testdata/workdir/push.yml` (+3 -3) </details> ### 📄 Description As stated [here](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems), there is no guaranty that `/github` will be the directory used and actions should not use hard coded `/github` but use the equivalent env var instead. Using the project dir allow us to mimic this case and in the same way allow users to mount the project dir from inside the container without problem. Solve #555 Should works for #551 / #410 too Also, running `go run main.go` run successfully now. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:51:26 +03:00
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#1500
No description provided.