File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ Follow the next steps to get the URL and SAS token:
9292- Create a new container. Set the access level to ** Blob (anonymous read access for blobs only)**
9393- Open the container, and click on ** Shared access signature**
9494- Create a new shared access signature with the following settings:
95- - Allowed permissions: ** Add **
95+ - Allowed permissions: ** Create **
9696 - Expiry time: ** Custom** (set the time you want)
9797 - Allowed protocols: ** HTTPS only**
9898- Click on ** Generate SAS and URL**
Original file line number Diff line number Diff line change @@ -23,10 +23,17 @@ export const uploadToAzure = async (
2323 for ( const attachment of attachments ) {
2424 try {
2525 if ( attachment . path ) {
26+ const githubRunId = process . env . GITHUB_RUN_ID || "" ;
2627 const parsedFile = parse ( attachment . path ) ;
27- const fileUrl = `${ azureContainerUrl } /${
28- parsedFile . name
29- } _${ Date . now ( ) } ${ parsedFile . ext } `;
28+ let fileUrl = `${ azureContainerUrl } ` ;
29+
30+ if ( githubRunId ) {
31+ fileUrl = `${ fileUrl } /${ githubRunId } ` ;
32+ }
33+
34+ fileUrl = `${ fileUrl } /${ parsedFile . name } _${ Date . now ( ) } ${
35+ parsedFile . ext
36+ } `;
3037
3138 const putResponse = await fetch ( `${ fileUrl } ?${ azureContainerSas } ` , {
3239 method : "PUT" ,
You can’t perform that action at this time.
0 commit comments