Add ability to pull image from docker after login

Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
divyansh42 2021-11-30 20:41:07 +05:30
parent 4c93cb1ea3
commit fc74315ff2
6 changed files with 66 additions and 27 deletions

View file

@ -6,6 +6,8 @@
import * as core from "@actions/core";
import * as exec from "@actions/exec";
import * as path from "path";
import { promises as fs } from "fs";
import * as os from "os";
interface ExecResult {
exitCode: number;
@ -64,3 +66,8 @@ export async function execute(
}
}
}
export async function getDockerConfigJson(): Promise<string> {
const dockerConfigPath = path.join(os.homedir(), ".docker", "config.json");
return fs.readFile(dockerConfigPath, "utf-8");
}