-
Notifications
You must be signed in to change notification settings - Fork 7
77 lines (68 loc) · 2.29 KB
/
main.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CD
on:
push:
repository_dispatch:
types:
- case_server_updated
- cgmes_gl_server_updated
- geo_data_updated
- network_conversion_server_updated
- network_map_server_updated
- network_store_server_updated
- single_line_diagram_server_updated
- gridstudy_app_updated
- study_server_updated
- odre_server_updated
- network_modification_server_updated
- gateway_updated
- loadflow_server_updated
- study_notification_server_updated
- actions_server_updated
- security_analysis_server_updated
- config_server_updated
- config_notification_server_updated
- filter_server_updated
- case_validation_server_updated
- directory_server_updated
- dynamic_simulation_server_updated
- dynamic_security_analysis_server_updated
- report_server_updated
- gridexplore_app_updated
- directory-notification_server_updated
- explore_server_updated
- dynamic_mapping_server_updated
- griddyna_app_updated
- sensitivity_analysis_server_updated
- user_admin_server_updated
- user_identity_oidc_replication_server_updated
- shortcircuit_server_updated
- timeseries_server_updated
- voltage_init_server_updated
- case_import_server_updated
- gridadmin_app_updated
- spreadsheet_config_server_updated
jobs:
build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Set up kubectl
uses: azure/setup-kubectl@v3.1
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install python dependencies
run: python -m pip install --upgrade pip pyyaml requests
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Create key
run: 'echo "$BASTION_KEY" > key; chmod 600 key'
env:
BASTION_KEY: ${{secrets.BASTION_KEY}}
- name: Deploy to Azure
run: kubectl kustomize k8s/live/azure-dev | python .github/scripts/image-tag-to-digest.py | ssh -o "StrictHostKeyChecking no" -i key ${{ secrets.BASTION_LOGIN }}@${{ secrets.BASTION_HOST }} kubectl apply -f -
- name: Delete key
run: rm key