-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.59 KB
/
upload_to_blob_storage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Blob storage assets CI
on:
push:
paths-ignore:
- '**.md'
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# with:
# lfs: true
- name: login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Upload to blob storage
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload-batch --account-name stpumptrack --auth-mode key -d 'spots' -s . --pattern *.json --content-type="application/json" --overwrite=true;
# az storage blob upload-batch --account-name stpumptrack --auth-mode key -d 'spots' -s . --pattern *.jpg --content-type="image/jpeg";
# az storage blob upload-batch --account-name stpumptrack --auth-mode key -d 'spots' -s . --pattern *.mp4 --content-type="video/mp4";
- name: Purge CDN endpoint
uses: azure/CLI@v1
with:
inlineScript: |
az cdn endpoint purge --content-paths "/spots/*" --profile-name "cdn" --name "pumptrack" --resource-group "pumptrack-assets"
# Azure logout
- name: logout
run: |
az logout
if: always()
- name: Dispatch pumptrack-map worfklow
uses: actions/github-script@v6
with:
github-token: ${{ secrets.PAT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'lluisd',
repo: 'pumptrack-map',
workflow_id: 'main_pumptrack-map-app.yml',
ref: 'main'
})