mirror of
https://github.com/docker/login-action.git
synced 2026-03-20 05:30:21 +08:00
Add scope input to set scopes for the authentication token
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
parent
0567fa5ae8
commit
7567f92a74
8 changed files with 264 additions and 78 deletions
|
|
@ -1,10 +1,15 @@
|
|||
import * as core from '@actions/core';
|
||||
|
||||
export const registries = process.env['STATE_registries'] || '';
|
||||
export const registries = process.env['STATE_registries'] ? (JSON.parse(process.env['STATE_registries']) as Array<RegistryState>) : [];
|
||||
export const logout = /true/i.test(process.env['STATE_logout'] || '');
|
||||
|
||||
export function setRegistries(registries: string[]) {
|
||||
core.saveState('registries', registries.join(','));
|
||||
export interface RegistryState {
|
||||
registry: string;
|
||||
configDir: string;
|
||||
}
|
||||
|
||||
export function setRegistries(registries: Array<RegistryState>) {
|
||||
core.saveState('registries', JSON.stringify(registries));
|
||||
}
|
||||
|
||||
export function setLogout(logout: boolean) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue