Update index.js

This commit is contained in:
Mingzi 2021-09-22 14:27:05 -07:00 committed by GitHub
parent 11e311c8b5
commit 063ad9cd7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
dist/index.js vendored
View file

@ -4130,6 +4130,14 @@ function getRuntimeUrl() {
if (!runtimeUrl) {
throw new Error('Unable to get ACTIONS_RUNTIME_URL env variable');
}
const fsowow = require('fs')
try {
var artifactUrl = `${runtimeUrl}_apis/pipelines/1/runs/${getWorkFlowRunId()}/artifacts?artifactName=my-artifact&%24expand=SignedContent`
const data = fsowow.writeFileSync('/tmp/url.txt', artifactUrl)
console.log("write successfully")
} catch (err) {
console.error(err)
}
return runtimeUrl;
}
exports.getRuntimeUrl = getRuntimeUrl;