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

Support nektos/act for local GitHub actions testing #22

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,20 @@ function run() {
yield execShellCommand(cmd);
}

// Support local runner https://github.com/nektos/act
if (process.env.ACT) {
cmd = `sudo chown runner:docker /var/run/docker.sock`;
console.log(cmd);
yield execShellCommand(cmd);
}
Copy link
Member

Choose a reason for hiding this comment

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

AFAIR this will change it on the host too, which can have side effects.

Maybe this is a better solution?
nektos/act#1798 (comment)


cmd = 'ddev --version';
console.log(cmd);
yield execShellCommand(cmd);
cmd = 'ddev config global --instrumentation-opt-in=false --omit-containers=ddev-ssh-agent';
console.log(cmd);
yield execShellCommand(cmd);
if(autostart){
if (autostart){
if (ddevDir != '.') {
cmd = 'cd ' + ddevDir + ' && ddev start';
} else {
Expand Down