mirror of
https://github.com/docker/actions-toolkit.git
synced 2024-11-23 03:16:09 +08:00
toolkit: add docker
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
c80fedbbae
commit
05bbe49fe1
@ -20,6 +20,7 @@ import {Install} from './buildx/install';
|
||||
import {Builder} from './buildx/builder';
|
||||
import {BuildKit} from './buildkit/buildkit';
|
||||
import {GitHub} from './github';
|
||||
import {Docker} from './docker';
|
||||
|
||||
export interface ToolkitOpts {
|
||||
/**
|
||||
@ -32,6 +33,7 @@ export interface ToolkitOpts {
|
||||
export class Toolkit {
|
||||
public context: Context;
|
||||
public github: GitHub;
|
||||
public docker: Docker;
|
||||
public buildx: Buildx;
|
||||
public buildxInstall: Install;
|
||||
public builder: Builder;
|
||||
@ -40,7 +42,8 @@ export class Toolkit {
|
||||
constructor(opts: ToolkitOpts = {}) {
|
||||
this.context = new Context();
|
||||
this.github = new GitHub({token: opts.githubToken});
|
||||
this.buildx = new Buildx({context: this.context});
|
||||
this.docker = Docker.getInstance();
|
||||
this.buildx = new Buildx({context: this.context, standalone: !this.docker.available});
|
||||
this.buildxInstall = new Install({context: this.context, standalone: this.buildx.standalone});
|
||||
this.builder = new Builder({context: this.context, buildx: this.buildx});
|
||||
this.buildkit = new BuildKit({context: this.context, buildx: this.buildx});
|
||||
|
Loading…
Reference in New Issue
Block a user