Put the job container name into the env context #62
No reviewers
Labels
No Label
duplicate
help wanted
invalid
kind
bug
kind
enhancement
kind
feature
kind
question
proposal
wontfix
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act#62
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "sillyguodong/act:add_env_of_job_container_name"
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?
Related: gitea/act_runner#189 (comment)
Refer to Docker Doc, the
--volumes-from
flag is used when running or creating a new container and takes the name or ID of the container from which you want to share volumes. Here's the syntax:So put the job container name into the
env
context in this PR.@ -255,6 +255,7 @@ func (rc *RunContext) startJobContainer() common.Executor {
logger.Infof("\U0001f680 Start image=%s", image)
name := rc.jobContainerName()
rc.Env["JOB_CONTAINER_NAME"] = name
Is
startHostEnvironment
the right place for preparingrc.Env
?No, startHostEnvironment doesn't create a docker job container at all and is used for creating a fake container structure to run all commands without docker on the host.