mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #666] [CLOSED] WIP: Enable Non-Root Runner Scenarios #1547
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#1547
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?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/666
Author: @JustinGrote
Created: 5/5/2021
Status: ❌ Closed
Base:
master← Head:feature/EnableNonRootWorkers📝 Commits (6)
035206bChange default non-bind path to runner directory056a0d9Fix basic test to write in workspace container2477a14Fix Dockerfile not compiling correctly on windows139ed1dSupress excessively verbose reference tag infoa33f97aAdd chown and mkdir functions for non-root scenarios42b0385Linter fix📊 Changes
5 files changed (+57 additions, -11 deletions)
View changed files
➕
.gitattributes(+3 -0)📝
pkg/common/git.go(+3 -2)📝
pkg/container/docker_run.go(+47 -5)📝
pkg/model/workflow.go(+2 -2)📝
pkg/runner/testdata/basic/push.yml(+2 -2)📄 Description
Currently act requires the docker container to have root privileges to work because it both binds and mounts to the "same path" as the host.
While the bind method is useful if using act as a task runner, the mount method will fail in non-root containers.
In order to more accurately test Github Actions for both permission and pathing errors, this PR makes mounts use the runner workdir by default and sets permissions accordingly. Binds with the -b flag will be unaffected and will continue to use the same path as what is on the container.
It will also add a parameter to customize the starting container workdir separately from the host workdir, if there is such a situation where you dont' want to use the default (usually /home/runner/workdir)
Example that this will fix
Try a simple action that does
mkdir -p /my/random/path. This will work just fine in act, but fail in Github Actions, and you won't find out till you run it in github actions.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.