Skip to content

Commit 8cd7bdf

Browse files
authored
Merge pull request #37 from nginxinc/ps-dev-readme
Update Actions usage instructions
2 parents 5ad0d6a + 3fe249a commit 8cd7bdf

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.github/workflows/github-action-test-nginxaas-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' github-action/test/configs/single/nginx.conf
3737
cat github-action/test/configs/single/nginx.conf
3838
- name: "Sync NGINX configuration to NGINXaaS for Azure - single file"
39-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
39+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
4040
with:
4141
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4242
resource-group-name: $TEST_RESOURCE_GROUP_NAME
@@ -56,7 +56,7 @@ jobs:
5656
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' github-action/test/configs/multi/conf.d/proxy.conf
5757
cat github-action/test/configs/multi/conf.d/proxy.conf
5858
- name: "Sync NGINX configuration and certificate to NGINXaaS for Azure - multi file"
59-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
59+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
6060
with:
6161
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
6262
resource-group-name: $TEST_RESOURCE_GROUP_NAME

github-action/README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ jobs:
3434
creds: ${{ secrets.AZURE_CREDENTIALS }}
3535

3636
- name: 'Sync the NGINX configuration from the GitHub repository to the NGINXaaS for Azure deployment'
37-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
37+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
3838
with:
3939
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4040
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
4141
nginx-deployment-name: ${{ secrets.NGINX_DEPLOYMENT_NAME }}
4242
nginx-config-directory-path: config/
4343
nginx-root-config-file: nginx.conf
4444
transformed-nginx-config-directory-path: /etc/nginx/
45+
debug: false
4546
```
4647
4748
### Sample workflow that authenticates with Azure using OIDC
@@ -76,14 +77,15 @@ jobs:
7677
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
7778

7879
- name: 'Sync the NGINX configuration from the GitHub repository to the NGINXaaS for Azure deployment'
79-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
80+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
8081
with:
8182
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
8283
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
8384
nginx-deployment-name: ${{ secrets.NGINX_DEPLOYMENT_NAME }}
8485
nginx-config-directory-path: config/
8586
nginx-root-config-file: nginx.conf
8687
transformed-nginx-config-directory-path: /etc/nginx/
88+
debug: false
8789
```
8890
8991
> **Note:**
@@ -104,13 +106,14 @@ To use this action to sync the configuration files from this example, the direct
104106

105107
```yaml
106108
- name: 'Sync the NGINX configuration from the GitHub repository to the NGINXaaS for Azure deployment'
107-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
109+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
108110
with:
109111
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
110112
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
111113
nginx-deployment-name: ${{ secrets.NGINX_DEPLOYMENT_NAME }}
112114
nginx-config-directory-path: config/
113115
nginx-root-config-file: nginx.conf
116+
debug: false
114117
```
115118

116119
By default, the action uses a file's relative path to `nginx-config-directory-path` in the repository as the file path in the NGINXaaS for Azure deployment.
@@ -136,14 +139,15 @@ The action supports an optional input `transformed-nginx-config-directory-path`
136139

137140
```yaml
138141
- name: 'Sync the NGINX configuration from the Git repository to the NGINXaaS for Azure deployment'
139-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
142+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
140143
with:
141144
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
142145
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
143146
nginx-deployment-name: ${{ secrets.NGINX_DEPLOYMENT_NAME }}
144147
nginx-config-directory-path: config/
145148
nginx-root-config-file: nginx.conf
146149
transformed-nginx-config-directory-path: /etc/nginx/
150+
debug: false
147151
```
148152
The transformed paths of the two configuration files in the NGINXaaS for Azure deployment are summarized in the following table
149153

@@ -168,20 +172,21 @@ See the example below
168172

169173
```yaml
170174
- name: "Sync NGINX certificates to NGINXaaS for Azure"
171-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
175+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
172176
with:
173177
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
174178
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
175179
nginx-deployment-name: ${{ secrets.NGINX_DEPLOYMENT_NAME }}
176180
nginx-deployment-location: ${{ secrets.NGINX_DEPLOYMENT_LOCATION }}
177181
nginx-certificates: '[{"certificateName": "$NGINX_CERT_NAME", "keyvaultSecret": "https://$NGINX_VAULT_NAME.vault.azure.net/secrets/$NGINX_CERT_NAME", "certificateVirtualPath": "/etc/nginx/ssl/my-cert.crt", "keyVirtualPath": "/etc/nginx/ssl/my-cert.key" } ]'
182+
debug: false
178183
```
179184

180185
## Handling NGINX configuration and certificates
181186

182187
```yaml
183188
- name: "Sync NGINX configuration- multi file and certificate to NGINXaaS for Azure"
184-
uses: nginxinc/nginx-for-azure-deploy-action@v0.3.1
189+
uses: nginxinc/nginx-for-azure-deploy-action/github-action@v0.4.0
185190
with:
186191
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
187192
resource-group-name: ${{ secrets.AZURE_RESOURCE_GROUP_NAME }}
@@ -191,4 +196,5 @@ See the example below
191196
nginx-root-config-file: nginx.conf
192197
transformed-nginx-config-directory-path: /etc/nginx/
193198
nginx-certificates: '[{"certificateName": "$NGINX_CERT_NAME", "keyvaultSecret": "https://$NGINX_VAULT_NAME.vault.azure.net/secrets/$NGINX_CERT_NAME", "certificateVirtualPath": "/etc/nginx/ssl/my-cert.crt", "keyVirtualPath": "/etc/nginx/ssl/my-cert.key" } ]'
199+
debug: false
194200
```

0 commit comments

Comments
 (0)