2021-03-31 14:31:58 +05:30
|
|
|
import * as core from "@actions/core";
|
2021-03-30 22:45:50 +05:30
|
|
|
|
2021-03-31 14:31:58 +05:30
|
|
|
/* eslint-disable dot-notation */
|
|
|
|
export const IsPost = !!process.env["STATE_isPost"];
|
|
|
|
export const registry = process.env["STATE_registry"] || "";
|
|
|
|
export const logout = /true/i.test(process.env["STATE_logout"] || "");
|
|
|
|
/* eslint-enable dot-notation */
|
2021-03-30 22:45:50 +05:30
|
|
|
|
2021-03-31 14:31:58 +05:30
|
|
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
|
|
export function setRegistry(registry: string): void {
|
|
|
|
core.saveState("registry", registry);
|
|
|
|
}
|
2021-03-30 22:45:50 +05:30
|
|
|
|
2021-03-31 14:31:58 +05:30
|
|
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
|
|
export function setLogout(logout: string): void {
|
|
|
|
core.saveState("logout", logout);
|
2021-03-30 22:45:50 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
if (!IsPost) {
|
2021-03-31 14:31:58 +05:30
|
|
|
core.saveState("isPost", "true");
|
2021-03-30 22:45:50 +05:30
|
|
|
}
|