mirror of
https://code.forgejo.org/actions/setup-go
synced 2025-06-11 04:52:25 +02:00
Update self-hosted environment validation and bump undici version (#556)
* Fix self-hosted environment check * Update isSelfHosted logic
This commit is contained in:
parent
691cc3533f
commit
dca8468d37
4 changed files with 75 additions and 9 deletions
10
src/utils.ts
10
src/utils.ts
|
@ -2,3 +2,13 @@ export enum StableReleaseAlias {
|
|||
Stable = 'stable',
|
||||
OldStable = 'oldstable'
|
||||
}
|
||||
|
||||
export const isSelfHosted = (): boolean =>
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
|
||||
(process.env['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined);
|
||||
/* the above is simplified from:
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
||
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === undefined
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue