docker: configDir

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-02-01 16:47:01 +01:00
parent 3150492079
commit c89aa60986
2 changed files with 31 additions and 1 deletions

View File

@@ -14,9 +14,15 @@
* limitations under the License.
*/
import os from 'os';
import path from 'path';
import * as exec from '@actions/exec';
export class Docker {
static get configDir(): string {
return process.env.DOCKER_CONFIG || path.join(os.homedir(), '.docker');
}
public static isAvailable(): boolean {
let dockerAvailable = false;
exec