mirror of
https://github.com/actions/toolkit.git
synced 2026-08-14 00:00:18 +02:00
16 lines
429 B
TypeScript
16 lines
429 B
TypeScript
export function getRuntimeToken(): string {
|
|||
|
|
const token = process.env['ACTIONS_RUNTIME_TOKEN']
|
||
|
|
if (!token) {
|
||
|
|
throw new Error('Unable to get ACTIONS_RUNTIME_TOKEN env variable')
|
||
|
|
}
|
||
|
|
return token
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getResultsServiceUrl(): string {
|
||
|
|
const resultsUrl = process.env['ACTIONS_RESULTS_URL']
|
||
|
|
if (!resultsUrl) {
|
||
|
|
throw new Error('Unable to get ACTIONS_RESULTS_URL env variable')
|
||
|
|
}
|
||
|
|
return resultsUrl
|
||
|
|
}
|