Run vendored artifact uploader directly
Staging Backend Quality Gate / validate (pull_request) Successful in 14m17s
Staging Backend Quality Gate / publish (pull_request) Has been skipped

This commit is contained in:
Jesse_Chen
2026-08-06 02:14:34 +08:00
parent 8842e834f3
commit fdd0dcdd3b
2 changed files with 35 additions and 23 deletions
@@ -164,8 +164,8 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest",
assert.equal((workflow.match(/timeout 180 docker pull "\$NODE_TOOL_SOURCE_IMAGE"/g) ?? []).length, 2);
assert.equal((workflow.match(/docker tag "\$NODE_TOOL_SOURCE_IMAGE" "\$NODE_TOOL_IMAGE"/g) ?? []).length, 2);
assert.equal((workflow.match(/cat > "\$tool_dir\/node" <<'EOF'/g) ?? []).length, 1);
assert.equal((workflow.match(/--volume "\$workdir:\$workdir"/g) ?? []).length, 1);
assert.equal((workflow.match(/--workdir "\$workdir"/g) ?? []).length, 1);
assert.equal((workflow.match(/--volume "\$workdir:\$workdir"/g) ?? []).length, 2);
assert.equal((workflow.match(/--workdir "\$workdir"/g) ?? []).length, 2);
assert.equal((workflow.match(/ln -s node "\$tool_dir\/npm"/g) ?? []).length, 1);
assert.equal((workflow.match(/>> "\$GITHUB_PATH"/g) ?? []).length, 2);
assert.match(workflow, /node:22-bookworm-slim "\$\{0##\*\/\}" "\$@"/);
@@ -209,14 +209,16 @@ test("Gitea quality gate validates before publishing an immutable ACR manifest",
assert.match(workflow, /get\("os"\)=="linux"/);
assert.match(workflow, /get\("architecture"\)=="amd64"/);
assert.match(workflow, /node frontend\/scripts\/staging-image-manifest\.mjs/);
assert.match(workflow, /uses: \.\/\.gitea\/actions\/upload-artifact/);
assert.match(workflow, /INPUT_PATH: artifacts\/staging-images\/manifest\.env/);
assert.match(workflow, /['"]INPUT_IF-NO-FILES-FOUND['"]: error/);
assert.match(workflow, /INPUT_OVERWRITE: ['"]false['"]/);
assert.match(workflow, /node \.gitea\/actions\/upload-artifact\/dist\/index\.js/);
assert.match(workflow, /--env INPUT_PATH=artifacts\/staging-images\/manifest\.env/);
assert.match(workflow, /--env ['"]INPUT_IF-NO-FILES-FOUND=error['"]/);
assert.match(workflow, /--env ACTIONS_RUNTIME_TOKEN/);
assert.match(workflow, /--env ACTIONS_RESULTS_URL/);
assert.match(workflow, /--env ['"]GITHUB_WORKSPACE=\$workdir['"]/);
assert.match(read(giteaUploadArtifactAction), /main: ['"]dist\/index\.js['"]/);
assert.match(read(giteaUploadArtifactAction), /81f940d004763f986ba3582c007fd842dd5cb0d7/);
assert.ok(existsSync(fileURLToPath(giteaUploadArtifactEntrypoint)));
assert.match(workflow, /name: staging-image-manifest-\$\{\{ gitea\.sha \}\}-\$\{\{ gitea\.run_attempt \}\}/);
assert.match(workflow, /INPUT_NAME=staging-image-manifest-\$GITEA_SHA-\$GITEA_RUN_ATTEMPT/);
assertOrder(workflow, [
"docker login",
"Record immutable linux-amd64 image manifest",