v1.6.5 #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Static File To CDN | |
on: | |
push: | |
tags: | |
- v* | |
- V* | |
jobs: | |
push_to_cdn: | |
name: Release Static File To CDN | |
runs-on: ubuntu-latest | |
env: | |
RELEASE_VERSION: 5.2.1 | |
DOCKER_CHAIN_NAME: optimism | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Install Azure Tools | |
id: meta | |
run: | | |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
wget https://aka.ms/downloadazcopy-v10-linux && tar -xvf downloadazcopy-v10-linux && sudo cp ./azcopy_linux_amd64_*/azcopy /usr/bin/ | |
rm -rf azcopy_linux_amd64_* | |
- name: Login To Azure | |
id: login | |
run: | | |
az login --service-principal -u ${{ secrets.AZURE_APPLICATION_ID }} -p ${{ secrets.AZURE_CLIENT_SECRECT }} --tenant ${{ secrets.AZURE_TENANT_ID }} | |
export AZCOPY_SPA_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRECT }} | |
azcopy login --service-principal --application-id ${{ secrets.AZURE_APPLICATION_ID }} --tenant-id ${{ secrets.AZURE_TENANT_ID }} | |
- name: Upload File To CDN | |
id: upload | |
run: | | |
azcopy cp --recursive --exclude-path '.git;.github' './*' 'https://simpletextreader.blob.core.windows.net/$web' | |
az cdn endpoint purge --resource-group kube-group --name simpletextreader --profile-name simpletextreader --content-paths "/*" --no-wait |