Skip to content

Commit

Permalink
use --background instead of tmux (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
n-g authored Mar 15, 2023
1 parent 0189699 commit e14db8c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1,313 deletions.
2 changes: 1 addition & 1 deletion common.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from "path";
import * as fs from "fs";

export const SessionId = "NscBuildkitProxySession";
export const ProxyPidFile = tmpFile("buildkit-proxy.pid");

export function tmpFile(file: string): string {
const tmpDir = path.join(process.env.RUNNER_TEMP, "ns");
Expand Down
6 changes: 3 additions & 3 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4322,7 +4322,7 @@ var external_fs_ = __nccwpck_require__(147);
;// CONCATENATED MODULE: ./common.ts


const SessionId = "NscBuildkitProxySession";
const ProxyPidFile = tmpFile("buildkit-proxy.pid");
function tmpFile(file) {
const tmpDir = external_path_.join(process.env.RUNNER_TEMP, "ns");
if (!external_fs_.existsSync(tmpDir)) {
Expand Down Expand Up @@ -4361,8 +4361,8 @@ Please add a step this step to your workflow's job definition:
function prepareBuildx() {
return __awaiter(this, void 0, void 0, function* () {
try {
const sock = tmpFile("buildkit.sock");
yield exec.exec(`tmux new-session -d -s ${SessionId} \"nsc cluster proxy --kind=buildkit --cluster=build-cluster --sock_path=${sock}\"`);
const sock = tmpFile("buildkit-proxy.sock");
yield exec.exec(`nsc cluster proxy --kind=buildkit --cluster=build-cluster --sock_path=${sock} --background=${ProxyPidFile}`);
yield exec.exec(`docker buildx create --name remote-nsc --driver remote unix://${sock}`);
yield exec.exec("docker buildx use remote-nsc");
}
Expand Down
Loading

0 comments on commit e14db8c

Please sign in to comment.