/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/actions/deploy-docs-site/lib/credential.mts
22 строки
777 B
Alan Agius
refactor(docs-infra): use Node.js temp APIs in deploy action
01 май 2026, 02:10
01 май 2026, 02:10
116f55c
Код
Авторство
О чём код?
import {writeFileSync, mkdtempSync} from 'node:fs'; import {join} from 'node:path'; import {tmpdir} from 'node:os'; import {getInput, setSecret} from '@actions/core'; let credentialFilePath: undefined | string; export function getCredentialFilePath(): string { if (credentialFilePath === undefined) { const tmpDir = mkdtempSync(join(tmpdir(), 'credential-')); const filePath = join(tmpDir, 'credential.json'); writeFileSync(filePath, getInput('serviceKey', {required: true})); setSecret(filePath); credentialFilePath = filePath; } return credentialFilePath; } /** Github access token. Used for querying the active release trains. */ export const githubReleaseTrainReadToken: string = getInput('githubReleaseTrainReadToken', { required: true, });