1
0
Fork 0
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:
Priya Gupta 2025-04-01 21:02:30 +05:30 committed by GitHub
parent 691cc3533f
commit dca8468d37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 75 additions and 9 deletions

View file

@ -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
*/