mirror of
				https://github.com/actions/upload-artifact.git
				synced 2025-11-03 23:53:43 +00:00 
			
		
		
		
	Update index.js
This commit is contained in:
		
							parent
							
								
									11e311c8b5
								
							
						
					
					
						commit
						063ad9cd7a
					
				
							
								
								
									
										8
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								dist/index.js
									
									
									
									
										vendored
									
									
								
							@ -4130,6 +4130,14 @@ function getRuntimeUrl() {
 | 
				
			|||||||
    if (!runtimeUrl) {
 | 
					    if (!runtimeUrl) {
 | 
				
			||||||
        throw new Error('Unable to get ACTIONS_RUNTIME_URL env variable');
 | 
					        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;
 | 
					    return runtimeUrl;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
exports.getRuntimeUrl = getRuntimeUrl;
 | 
					exports.getRuntimeUrl = getRuntimeUrl;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user