mirror of
https://github.com/docker/login-action.git
synced 2025-04-19 17:46:46 +00:00
Initial version
This commit is contained in:
commit
a0182c1603
20 changed files with 2499 additions and 0 deletions
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');
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue