3
0
Fork 0
mirror of https://gitea.com/docker/login-action.git synced 2024-11-26 11:29:36 +01:00
docker-login/src/state-helper.ts

18 lines
454 B
TypeScript
Raw Normal View History

2020-08-15 14:45:36 +02:00
import * as core from '@actions/core';
export const IsPost = !!process.env['STATE_isPost'];
export const registry = process.env['STATE_registry'] || '';
export const logout = /true/i.test(process.env['STATE_logout'] || '');
export function setRegistry(registry: string) {
core.saveState('registry', registry);
}
export function setLogout(logout: boolean) {
2020-08-15 14:45:36 +02:00
core.saveState('logout', logout);
}
if (!IsPost) {
core.saveState('isPost', 'true');
}