-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (51 loc) · 1.5 KB
/
legacy-js.yaml
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
name: Export javascript for AEM content to Azure container
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment for legacy javascript'
required: true
type: choice
options:
- development
- production
default: development
push:
branches:
- main
paths:
- 'legacy/js/**'
- '!legacy/js/README.md'
- '!legacy/js/CHANGELOG.md'
- '!legacy/js/node_modules/**'
- '!legacy/js/dist/**'
jobs:
build:
name: 'Upload legacy javascript to azure container'
runs-on: ubuntu-latest
environment:
name: ${{ github.event.inputs.environment }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Build legacy js
id: build-legacy-js
working-directory: ./legacy/js
run: |
npm install
- name: Login to Azure 🌥️
id: login-to-azure
uses: azure/login@v1
with:
creds: ${{ secrets.ENVIS_ACTIONS_SERVICE_PRINCIPAL }}
- name: Export to Azure
uses: azure/CLI@v1
with:
inlineScript: |
az storage blob upload --account-name ${{ vars.AZ_STORAGE_ACCOUNT_NAME }} --auth-mode key -c ${{ vars.STORAGE_CONTAINER_NAME }} -f ./legacy/js/dist/js/legacy.minified.js -n legacy.minified.js
- name: log-errors-to-slack 📄
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: failure()