@@ -4,6 +4,7 @@ name: Test Github action to update NGINX for Azure configurations
4
4
on :
5
5
schedule :
6
6
- cron : ' 0 20 * * *'
7
+ - cron : ' 5 * * * *'
7
8
8
9
env :
9
10
NGINX_DEPLOYMENT_NAME : githhubci-test-dep
@@ -19,46 +20,46 @@ jobs:
19
20
Update-NGINX-Configuration :
20
21
runs-on : ubuntu-latest
21
22
steps :
22
- - name : ' Checkout repository'
23
- uses : actions/checkout@v2
24
- - name : ' AZ CLI Login'
25
- uses : azure/login@v1
26
- with :
27
- client-id : ${{ secrets.AZURE_CLIENT_ID }}
28
- tenant-id : ${{ secrets.AZURE_TENANT_ID }}
23
+ - name : ' Checkout repository'
24
+ uses : actions/checkout@v2
25
+ - name : ' AZ CLI Login'
26
+ uses : azure/login@v1
27
+ with :
28
+ client-id : ${{ secrets.AZURE_CLIENT_ID }}
29
+ tenant-id : ${{ secrets.AZURE_TENANT_ID }}
30
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
31
+ - name : ' Update config - single file'
32
+ shell : bash
33
+ run : |
34
+ echo "RANDOM=$((RANDOM%10))" >> $GITHUB_ENV
35
+ sed -i 's/000000/'"${ env.RANDOM }"'/g' tests/configs/single/nginx.conf
36
+ - name : ' Sync NGINX configuration to NGINX on Azure instance - single file'
37
+ uses : nginxinc/nginx-for-azure-deploy-action@v0
38
+ with :
29
39
subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
30
- - name : ' Update config - single file'
31
- shell : bash
32
- run : |
33
- echo "RANDOM=$((RANDOM%10))" >> $GITHUB_ENV
34
- sed -i 's/000000/'"${ env.RANDOM }"'/g' tests/configs/single/nginx.conf
35
- - name : ' Sync NGINX configuration to NGINX on Azure instance - single file'
36
- uses : nginxinc/nginx-for-azure-deploy-action@v0
37
- with :
38
- subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
39
- resource-group-name : $TEST_RESOURCE_GROUP_NAME
40
- nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
41
- nginx-config-directory-path : tests/configs/single/
42
- nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
43
- transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
44
- - name : ' Validate config update - single file'
45
- shell : bash
46
- run : |
47
- wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"${ env.RANDOM }"'")'
48
- - name : ' Update config - multi file'
49
- shell : bash
50
- run : |
51
- sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/multi/conf.d/proxy.conf
52
- - name : ' Sync NGINX configuration to NGINX on Azure instance - multi file'
53
- uses : nginxinc/nginx-for-azure-deploy-action@v0
54
- with :
55
- subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
56
- resource-group-name : $TEST_RESOURCE_GROUP_NAME
57
- nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
58
- nginx-config-directory-path : tests/configs/multi/
59
- nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
60
- transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
61
- - name : ' Validate config update'
62
- shell : bash
63
- run : |
64
- wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
40
+ resource-group-name : $TEST_RESOURCE_GROUP_NAME
41
+ nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
42
+ nginx-config-directory-path : tests/configs/single/
43
+ nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
44
+ transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
45
+ - name : ' Validate config update - single file'
46
+ shell : bash
47
+ run : |
48
+ wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"${ env.RANDOM }"'")'
49
+ - name : ' Update config - multi file'
50
+ shell : bash
51
+ run : |
52
+ sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' tests/configs/multi/conf.d/proxy.conf
53
+ - name : ' Sync NGINX configuration to NGINX on Azure instance - multi file'
54
+ uses : nginxinc/nginx-for-azure-deploy-action@v0
55
+ with :
56
+ subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
57
+ resource-group-name : $TEST_RESOURCE_GROUP_NAME
58
+ nginx-deployment-name : $NGINX_DEPLOYMENT_NAME
59
+ nginx-config-directory-path : tests/configs/multi/
60
+ nginx-root-config-file : $NGINX_ROOT_CONFIG_FILE
61
+ transformed-nginx-config-directory-path : $NGINX_TRANSFORMED_CONFIG_DIR_PATH
62
+ - name : ' Validate config update'
63
+ shell : bash
64
+ run : |
65
+ wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_ID"'")'
0 commit comments