Skip to content

Commit

Permalink
Update UploadAndNotify.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tshanep authored Feb 7, 2024
1 parent 2f7092c commit 1845cf8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/UploadAndNotify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ jobs:

- name: Upload file to Blob Storage
run: |
az storage blob upload --account-name poweraccelerators --container-name accelerators --name simplefile.txt --file simplefile.txt
az storage blob upload --account-name poweraccelerators --container-name accelerators --name simplefile.txt --file simplefile.txt --account-key ${{ secrets.AZURE_STORAGE_KEY }}
- name: Generate SAS Token
run: |
$storageAccountKey = "${{ secrets.AZURE_STORAGE_KEY }}"
$expiry = (Get-Date).AddDays(365).ToString("yyyy-MM-ddTHH:mm:ssZ")
$sas = az storage blob generate-sas --account-name poweraccelerators --container-name accelerators --name simplefile.txt --permissions r --expiry $expiry --account-key $storageAccountKey --output tsv
$sas = az storage blob generate-sas --account-name poweraccelerators --container-name accelerators --name simplefile.txt --permissions r --expiry $expiry --account-key ${{ secrets.AZURE_STORAGE_KEY }} --output tsv
echo "SAS_TOKEN=$sas" >> $GITHUB_ENV
echo "SAS_URL=https://poweraccelerators.blob.core.windows.net/accelerators/simplefile.txt?$sas" >> $GITHUB_ENV
shell: pwsh
Expand Down

0 comments on commit 1845cf8

Please sign in to comment.