@@ -24,6 +24,10 @@ inputs:
2424 description : The sub folder to add the files to in the storage account
2525 required : false
2626 default : ' yes'
27+ waitPeriod :
28+ description : The number of seconds to wait before removing the IP address from the firewall
29+ required : false
30+ default : 30
2731
2832runs :
2933 using : " composite"
4953 - name : Authenticate to Azure as a Service Principal
5054 uses : azure/login@v1
5155 with :
52- creds : ${{ inputs.azure_credentials }}
56+ creds : ${{ inputs.azure_credentials }}
5357
5458 - name : Find and replace the placeholders
5559 shell : pwsh
7276 echo "AGENT_IP=$(echo $myIP | tr / -)" >> $GITHUB_ENV
7377 az storage account network-rule add --resource-group ${{ inputs.resource-group }} --account-name ${{ inputs.storage-account }} --ip-address $myIP
7478 az storage account show -n ${{ inputs.storage-account }} --query networkRuleSet
75- echo " ==> Sleep for 30 seconds to allow the firewall change to take "
76- sleep 30
79+ echo " ==> Sleep for ${{ inputs.waitPeriod }} seconds to allow the firewall change to take "
80+ sleep ${{ inputs.waitPeriod }}
7781 az storage blob upload --account-name ${{ inputs.storage-account }} --auth-mode login -f '${{ inputs.working-directory }}/${{ inputs.target-directory }}/manifest.json' -c '${{inputs.container}}' -n '${{ env.BRANCH_NAME }}/manifest.json' --content-type 'application/json' --overwrite
7882 az storage blob upload --account-name ${{ inputs.storage-account }} --auth-mode login -f '${{ inputs.working-directory }}/${{ inputs.target-directory }}/catalog.json' -c '${{inputs.container}}' -n '${{ env.BRANCH_NAME }}/catalog.json' --content-type 'application/json' --overwrite
7983 az storage blob upload --account-name ${{ inputs.storage-account }} --auth-mode login -f '${{ inputs.working-directory }}/${{ inputs.target-directory }}/index.html' -c '${{inputs.container}}' -n '${{ env.BRANCH_NAME }}/index.html' --content-type 'text/html' --overwrite
8791 echo "Adding this IP address to rules: $myIP"
8892 echo "AGENT_IP=$(echo $myIP | tr / -)" >> $GITHUB_ENV
8993 az storage account network-rule add --resource-group ${{ inputs.resource-group }} --account-name ${{ inputs.storage-account }} --ip-address $myIP
90- echo " ==> Sleep for 30 seconds to allow the firewall change to take "
91- sleep 30
94+ echo " ==> Sleep for ${{ inputs.waitPeriod }} seconds to allow the firewall change to take "
95+ sleep ${{ inputs.waitPeriod }}
9296 az storage blob upload --account-name ${{ inputs.storage-account }} -f '${{ inputs.working-directory }}/${{ inputs.target-directory }}/manifest.json' -c '${{inputs.container}}' -n 'manifest.json' --content-type 'application/json' --overwrite
9397 az storage blob upload --account-name ${{ inputs.storage-account }} -f '${{ inputs.working-directory }}/${{ inputs.target-directory }}/catalog.json' -c '${{inputs.container}}' -n 'catalog.json' --content-type 'application/json' --overwrite
9498 az storage blob upload --account-name ${{ inputs.storage-account }} -f '${{ inputs.working-directory }}/${{ inputs.target-directory }}/index.html' -c '${{inputs.container}}' -n 'index.html' --content-type 'text/html' --overwrite
0 commit comments