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 23:54:57 +05:30
|
|
|
export const IsPost = !!process.env.STATE_isPost;
|
|
|
|
export const registry = process.env.STATE_registry || "";
|
|
|
|
export const logout = /true/i.test(process.env.STATE_logout || "");
|
2021-03-30 22:45:50 +05:30
|
|
|
|
2021-03-31 23:54:57 +05:30
|
|
|
export function setRegistry(inputRegistry: string): void {
|
|
|
|
core.saveState("registry", inputRegistry);
|
2021-03-31 14:31:58 +05:30
|
|
|
}
|
2021-03-30 22:45:50 +05:30
|
|
|
|
2021-03-31 23:54:57 +05:30
|
|
|
export function setLogout(registryLogout: string): void {
|
|
|
|
core.saveState("logout", registryLogout);
|
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
|
|
|
}
|