diff --git a/.gitea/workflows/salon-prod-deploy.yml b/.gitea/workflows/salon-prod-deploy.yml index edf960ac..43b882a5 100644 --- a/.gitea/workflows/salon-prod-deploy.yml +++ b/.gitea/workflows/salon-prod-deploy.yml @@ -57,7 +57,7 @@ jobs: response_file="$RUNNER_TEMP/salon-prod-artifacts.json" curl --fail-with-body --silent --show-error --retry 3 --retry-all-errors \ -H "Authorization: Bearer $GITEA_TOKEN" "$api_base" > "$response_file" - artifact_id=$(node -e 'const fs=require("fs"); const name=process.argv[1]; const data=JSON.parse(fs.readFileSync(process.argv[2],"utf8")); const item=(data.value||[]).find(v=>v.name===name); if(!item||!item.fileContainerResourceUrl) process.exit(2); const m=item.fileContainerResourceUrl.match(/\\/(\\d+)\\/path$/); if(!m) process.exit(3); process.stdout.write(m[1]);' "$ARTIFACT_NAME" "$response_file") + artifact_id=$(node -e 'const fs=require("fs"); const name=process.argv[1]; const data=JSON.parse(fs.readFileSync(process.argv[2],"utf8")); const item=(data.value||[]).find(v=>v.name===name); if(!item||!item.id) process.exit(2); process.stdout.write(String(item.id));' "$ARTIFACT_NAME" "$response_file" path_url="$GITHUB_SERVER_URL/api/actions_pipeline/_apis/pipelines/workflows/$PREPARE_RUN_ID/artifacts/$artifact_id/path?api-version=6.0-preview" curl --fail-with-body --silent --show-error --retry 3 --retry-all-errors \ -H "Authorization: Bearer $GITEA_TOKEN" "$path_url" > "$RUNNER_TEMP/salon-prod-artifact-path.json"