mirror of
https://github.com/docker/login-action.git
synced 2025-08-19 03:05:53 +08:00
Initial version
This commit is contained in:
17
src/state-helper.ts
Normal file
17
src/state-helper.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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: string) {
|
||||
core.saveState('logout', logout);
|
||||
}
|
||||
|
||||
if (!IsPost) {
|
||||
core.saveState('isPost', 'true');
|
||||
}
|
Reference in New Issue
Block a user