2020-08-15 14:45:36 +02:00
|
|
|
import * as core from '@actions/core';
|
|
|
|
|
|
2026-01-06 13:51:25 +01:00
|
|
|
export const registries = process.env['STATE_registries'] ? (JSON.parse(process.env['STATE_registries']) as Array<RegistryState>) : [];
|
2020-08-15 14:45:36 +02:00
|
|
|
export const logout = /true/i.test(process.env['STATE_logout'] || '');
|
|
|
|
|
|
2026-01-06 13:51:25 +01:00
|
|
|
export interface RegistryState {
|
|
|
|
|
registry: string;
|
|
|
|
|
configDir: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function setRegistries(registries: Array<RegistryState>) {
|
|
|
|
|
core.saveState('registries', JSON.stringify(registries));
|
2020-08-15 14:45:36 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-22 10:39:55 +02:00
|
|
|
export function setLogout(logout: boolean) {
|
2020-08-15 14:45:36 +02:00
|
|
|
core.saveState('logout', logout);
|
|
|
|
|
}
|