7
7
8
8
env :
9
9
NGINX_DEPLOYMENT_NAME : githhubci-test-dep
10
- NGINX_CONFIG_FILE : test/configs/nginx.conf
10
+ NGINX_TRANSFORMED_CONFIG_DIR_PATH : /etc/nginx/
11
+ NGINX_ROOT_CONFIG_FILE : nginx.conf
11
12
TEST_RESOURCE_GROUP_NAME : testenv-0da38993-workload
12
13
13
14
permissions :
@@ -20,23 +21,38 @@ jobs:
20
21
steps :
21
22
- name : ' Checkout repository'
22
23
uses : actions/checkout@v2
23
- - name : ' Update config'
24
- shell : bash
25
- run : |
26
- sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' $NGINX_CONFIG_FILE
27
24
- name : ' AZ CLI Login'
28
25
uses : azure/login@v1
29
26
with :
30
27
client-id : ${{ secrets.AZURE_CLIENT_ID }}
31
28
tenant-id : ${{ secrets.AZURE_TENANT_ID }}
32
29
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
33
- - name : ' Sync NGINX configuration to NGINX on Azure instance'
30
+ - name : ' Sync NGINX configuration to NGINX on Azure instance - single file'
31
+ uses : nginxinc/nginx-for-azure-deploy-action@v0
32
+ with :
33
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
34
+ resource-group-name : $TEST_RESOURCE_GROUP_NAME
35
+ nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
36
+ nginx-config-directory-path : tests/configs/single/
37
+ nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
38
+ transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
39
+ - name : ' Validate config update - multi file'
40
+ shell : bash
41
+ run : |
42
+ wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "000000")'
43
+ - name : ' Update config'
44
+ shell : bash
45
+ run : |
46
+ sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/multi/conf.d/proxy.conf
47
+ - name : ' Sync NGINX configuration to NGINX on Azure instance - multi file'
34
48
uses : nginxinc/nginx-for-azure-deploy-action@v0
35
49
with :
36
50
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
37
51
resource-group-name : $TEST_RESOURCE_GROUP_NAME
38
52
nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
39
- nginx-config-relative-file-path : $NGINX_CONFIG_FILE
53
+ nginx-config-directory-path : tests/configs/multi/
54
+ nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
55
+ transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
40
56
- name : ' Validate config update'
41
57
shell : bash
42
58
run : |
0 commit comments