mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2025-02-28 20:23:26 +00:00
Update isSelfHosted logic
This commit is contained in:
parent
a5bc5249cb
commit
b20f2f5048
2 changed files with 12 additions and 12 deletions
10
dist/setup/index.js
vendored
10
dist/setup/index.js
vendored
|
@ -96642,14 +96642,14 @@ var StableReleaseAlias;
|
|||
StableReleaseAlias["Stable"] = "stable";
|
||||
StableReleaseAlias["OldStable"] = "oldstable";
|
||||
})(StableReleaseAlias || (exports.StableReleaseAlias = StableReleaseAlias = {}));
|
||||
const isSelfHosted = () => process.env['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
(process.env['AGENT_ISSELFHOSTED'] === undefined &&
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted');
|
||||
const isSelfHosted = () => process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' &&
|
||||
(process.env['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined);
|
||||
exports.isSelfHosted = isSelfHosted;
|
||||
/* the above is simplified from:
|
||||
process.env['RUNNER_ENVIRONMENT'] === undefined && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined && process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted'
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === undefined
|
||||
*/
|
||||
|
||||
|
||||
|
|
10
src/utils.ts
10
src/utils.ts
|
@ -4,11 +4,11 @@ export enum StableReleaseAlias {
|
|||
}
|
||||
|
||||
export const isSelfHosted = (): boolean =>
|
||||
process.env['AGENT_ISSELFHOSTED'] === '1' ||
|
||||
(process.env['AGENT_ISSELFHOSTED'] === undefined &&
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted');
|
||||
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'] === undefined && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === '1'
|
||||
||
|
||||
process.env['AGENT_ISSELFHOSTED'] === undefined && process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted'
|
||||
process.env['RUNNER_ENVIRONMENT'] !== 'github-hosted' && process.env['AGENT_ISSELFHOSTED'] === undefined
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue