mirror of
https://github.com/github/codeql-action.git
synced 2026-11-09 06:29:52 +00:00
Add log messages at INFO level about which artifact version used
This commit is contained in:
17
lib/start-proxy-action-post.js
generated
17
lib/start-proxy-action-post.js
generated
@@ -64,10 +64,19 @@ async function runWrapper() {
|
||||
try {
|
||||
// `@actions/artifact@v2` is not yet supported on GHES so the legacy version of the client will be used on GHES
|
||||
// until it is supported. We also use the legacy version of the client if the feature flag is disabled.
|
||||
const artifactUploader = config?.gitHubVersion.type !== util_1.GitHubVariant.GHES &&
|
||||
(await features.getValue(feature_flags_1.Feature.ArtifactV2Upgrade))
|
||||
? new artifact.DefaultArtifactClient()
|
||||
: artifactLegacy.create();
|
||||
let artifactUploader;
|
||||
if (gitHubVersion.type === util_1.GitHubVariant.GHES) {
|
||||
logger.info("Uploading debug artifacts using the `@actions/artifact@v1` client because the `v2` version is not yet supported on GHES.");
|
||||
artifactUploader = artifactLegacy.create();
|
||||
}
|
||||
else if (!(await features.getValue(feature_flags_1.Feature.ArtifactV2Upgrade))) {
|
||||
logger.info("Uploading debug artifacts using the `@actions/artifact@v1` client because the value of the relevant feature flag is false. To use the `v2` version of the client, set the `CODEQL_ACTION_ARTIFACT_V2_UPGRADE` environment variable to true.");
|
||||
artifactUploader = artifactLegacy.create();
|
||||
}
|
||||
else {
|
||||
logger.info("Uploading debug artifacts using the `@actions/artifact@v2` client.");
|
||||
artifactUploader = new artifact.DefaultArtifactClient();
|
||||
}
|
||||
await artifactUploader.uploadArtifact("proxy-log-file", [logFilePath], actionsUtil.getTemporaryDirectory(), {
|
||||
// ensure we don't keep the debug artifacts around for too long since they can be large.
|
||||
retentionDays: 7,
|
||||
|
||||
Reference in New Issue
Block a user