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