mirror of
https://github.com/redhat-actions/podman-login.git
synced 2025-06-08 02:29:03 +00:00
Add ability to pull image from docker after login
Signed-off-by: divyansh42 <diagrawa@redhat.com>
This commit is contained in:
parent
4c93cb1ea3
commit
fc74315ff2
6 changed files with 66 additions and 27 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue