buildx: configDir

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-02-10 11:31:34 +01:00
parent 392903fad6
commit 5e365b5a48
2 changed files with 27 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
* limitations under the License.
*/
import path from 'path';
import * as exec from '@actions/exec';
import * as semver from 'semver';
@@ -42,6 +43,10 @@ export class Buildx {
this.standalone = opts?.standalone ?? !Docker.isAvailable;
}
static get configDir(): string {
return process.env.BUILDX_CONFIG || path.join(Docker.configDir, 'buildx');
}
public getCommand(args: Array<string>) {
return {
command: this.standalone ? 'buildx' : 'docker',