Skip to content

Commit fedb02c

Browse files
committed
address feedback
1 parent 5547460 commit fedb02c

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ inputs:
1010
nginx-deployment-name:
1111
description: 'The name of the NGINX deployment'
1212
required: true
13-
nginx-config-file-path:
14-
description: 'The file path of the NGINX configuration file in the Git repository'
13+
nginx-config-relative-file-path:
14+
description: 'The relative file path of the NGINX configuration file in the Git repository'
1515
required: true
1616
default: './config/nginx.conf'
1717
runs:
1818
using: "composite"
1919
steps:
2020
- name: 'Deploy configuration to the NGINX deployment in Azure'
21-
run: ${{github.action_path}}/src/deploy-config.sh ${{ inputs.subscription-id }} ${{ inputs.resource-group-name }} ${{ inputs.nginx-deployment-name }} ${{ inputs.nginx-config-file-path }}
21+
run: ${{github.action_path}}/src/deploy-config.sh ${{ inputs.subscription-id }} ${{ inputs.resource-group-name }} ${{ inputs.nginx-deployment-name }} ${{ inputs.nginx-config-relative-file-path }}
2222
shell: bash

src/deploy-config.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
2-
3-
# Stop on error.
4-
set -e
2+
set -euo pipefail
3+
IFS=$'\n\t'
54

65
subscriptionId=$1
76
resourceGroupName=$2
@@ -11,12 +10,10 @@ nginxConfigurationFile=$4
1110
# Read and encode the NGINX configuration file content.
1211
if [ -f "$nginxConfigurationFile" ]
1312
then
14-
echo "NGINX configuration"
15-
cat "$nginxConfigurationFile"
16-
echo ""
13+
echo "The NGINX configuration file was found."
1714
else
18-
echo "NGINX configuration $nginxConfigurationFile does not exist."
19-
exit 32
15+
echo "The NGINX configuration file $nginxConfigurationFile does not exist."
16+
exit 2
2017
fi
2118

2219
encodedConfigContent=$(base64 $nginxConfigurationFile)

0 commit comments

Comments
 (0)