|
1 |
| -name: 'NGINX For Azure Deployment Sync' |
2 |
| -description: 'The action synchronizes NGINX configuration from a Git repository and/or certificates already on Azure keyvault to an NGINX for Azure deployment' |
| 1 | +name: "NGINX For Azure Deployment Sync" |
| 2 | +description: "The action synchronizes NGINX configuration from a Git repository and/or certificates already on Azure keyvault to an NGINX for Azure deployment" |
3 | 3 | inputs:
|
4 | 4 | subscription-id:
|
5 |
| - description: 'The Azure subscription ID of the NGINX for Azure deployment.' |
| 5 | + description: "The Azure subscription ID of the NGINX for Azure deployment." |
6 | 6 | required: true
|
7 | 7 | resource-group-name:
|
8 |
| - description: 'The resource group of the NGINX for Azure deployment.' |
| 8 | + description: "The resource group of the NGINX for Azure deployment." |
9 | 9 | required: true
|
10 | 10 | nginx-deployment-name:
|
11 |
| - description: 'The name of the NGINX for Azure deployment.' |
| 11 | + description: "The name of the NGINX for Azure deployment." |
12 | 12 | required: true
|
13 | 13 | nginx-deployment-location:
|
14 |
| - description: 'The location where the NGINX deployment is located. Example westcentralus' |
| 14 | + description: "The location where the NGINX deployment is located. Example westcentralus" |
15 | 15 | required: false
|
16 | 16 | nginx-config-directory-path:
|
17 | 17 | description: 'The NGINX configuration directory path relative to the root of the Git repository, example: "config/".'
|
18 | 18 | required: false
|
19 | 19 | nginx-root-config-file:
|
20 | 20 | description: >
|
21 |
| - 'The root NGINX configuration file path relative to the NGINX configuration directory in the Git repository, example: "nginx.conf".' |
| 21 | + 'The root NGINX configuration file path relative to the NGINX configuration directory in the Git repository, example: "nginx.conf".' |
22 | 22 | required: false
|
23 |
| - default: 'nginx.conf' |
| 23 | + default: "nginx.conf" |
24 | 24 | transformed-nginx-config-directory-path:
|
25 | 25 | description: >
|
26 |
| - 'The transformed absolute path of the NGINX configuration directory in NGINX for Azure deployment, example: "/etc/nginx/". |
27 |
| - If the "include" directive in the NGINX configuration files uses absolute paths, the path transformation |
28 |
| - can be used to overwrite the file paths when the action synchronizes the files to the NGINX for Azure deployment.' |
| 26 | + 'The transformed absolute path of the NGINX configuration directory in NGINX for Azure deployment, example: "/etc/nginx/". |
| 27 | + If the "include" directive in the NGINX configuration files uses absolute paths, the path transformation |
| 28 | + can be used to overwrite the file paths when the action synchronizes the files to the NGINX for Azure deployment.' |
29 | 29 | required: false
|
30 |
| - default: '' |
| 30 | + default: "" |
31 | 31 | nginx-certificate-details:
|
32 | 32 | description: 'An array of JSON objects each with keys nginx_cert_name, keyvault_secret, certificate_virtual_path and key_virtual_path. Example: [{"certificateName": "server1", "keyvaultSecret": "https://...", "certificateVirtualPath": "/etc/ssl/certs/server1.crt", "keyVirtualPath": "/etc/ssl/certs/server1.key" }, {"name": "server2", "keyvaultSecret": "https://...", "certificateVirtualPath": "/etc/ssl/certs/server2.crt", "keyVirtualPath": "/etc/ssl/certs/server2.key" }] '
|
33 | 33 | required: false
|
34 | 34 | runs:
|
35 | 35 | using: "composite"
|
36 | 36 | steps:
|
37 |
| - - name: 'Synchronize NGINX configuration from the Git repository to an NGINX for Azure deployment' |
| 37 | + - name: "Synchronize NGINX certificate(s) from the Git repository to an NGINX for Azure deployment" |
| 38 | + run: ${{github.action_path}}/src/deploy-certificate.sh --subscription_id=${{ inputs.subscription-id }} --resource_group_name=${{ inputs.resource-group-name }} --nginx_deployment_name=${{ inputs.nginx-deployment-name }} --nginx_resource_location=${{ inputs.nginx-deployment-location }} --certificates=${{ toJSON(inputs.nginx-certificate-details) }} |
| 39 | + if: ${{ inputs.nginx-deployment-location != '' && inputs.nginx-certificate-details != '' }} |
| 40 | + shell: bash |
| 41 | + - name: "Synchronize NGINX configuration from the Git repository to an NGINX for Azure deployment" |
38 | 42 | run: ${{github.action_path}}/src/deploy-config.sh --subscription_id=${{ inputs.subscription-id }} --resource_group_name=${{ inputs.resource-group-name }} --nginx_deployment_name=${{ inputs.nginx-deployment-name }} --config_dir_path=${{ inputs.nginx-config-directory-path }} --root_config_file=${{ inputs.nginx-root-config-file }} --transformed_config_dir_path=${{ inputs.transformed-nginx-config-directory-path }}
|
39 | 43 | if: ${{ inputs.nginx-config-directory-path != '' }}
|
40 | 44 | shell: bash
|
41 |
| - - name: 'Synchronize NGINX certificate(s) from the Git repository to an NGINX for Azure deployment' |
42 |
| - run: ${{github.action_path}}/src/deploy-certificate.sh --subscription_id=${{ inputs.subscription-id }} --resource_group_name=${{ inputs.resource-group-name }} --nginx_deployment_name=${{ inputs.nginx-deployment-name }} --nginx_resource_location=${{ inputs.nginx-deployment-location }} --certificates=${{ toJSON(inputs.nginx-certificate-details) }} |
43 |
| - if: ${{ inputs.nginx-deployment-location != '' && inputs.nginx-certificate-details != '' }} |
44 |
| - shell: bash |
0 commit comments