You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Sync your App Configuration instance using GitHub Actions
13
-
Azure App Configuration uses GitHub Actions to update an App Configuration instance when triggered by an action performed on a GitHub repository. GitHub workflows can trigger app configuration updates, enabling the integration of those updates into the same workflow used to update the app code.
13
+
Azure App Configuration uses GitHub Actions to trigger updates to an App Configuration instance based on actions performed on a GitHub repository. GitHub workflows trigger configuration updates, enabling the integration of those updates into the same workflow used to update the app code.
14
14
15
15
A GitHub Actions [workflow](https://help.github.com/articles/about-github-actions#workflow) defines an automated process in a GitHub repository. This process tells GitHub how to build and deploy your GitHub project. Azure App Configuration provides the *Azure App Configuration Sync* Action to enable updates to an App Configuration instance when changes are made to the source repository.
16
16
17
17
A YAML (.yml) file found in the `/.github/workflows/` path of your repository defines your workflow. This definition contains the workflow's steps and parameters.
18
18
19
-
GitHub events, such as a push to a repository, can trigger a GitHub Action workflow. The *Azure App Configuration Sync* action enables you to trigger an update of an App Configuration instance when a specified GitHub action occurs. This allows you to leverage GitHub's core features when pushing, reviewing, or branching app configuration files just as you do with app code.
19
+
GitHub events, such as a push to a repository, can trigger a GitHub Action workflow. The *Azure App Configuration Sync* action enables you to trigger an update of an App Configuration instance when a specified GitHub action occurs. You can trigger configuration updates when pushing, reviewing, or branching app configuration files just as you do with app code.
20
20
21
21
The GitHub [documentation](https://help.github.com/actions/automating-your-workflow-with-github-actions/configuring-a-workflow) provides in-depth view of GitHub workflows and actions.
22
22
@@ -26,12 +26,12 @@ To start using this GitHub action, go to your repository and select the **Action
26
26
> 
27
27
28
28
> [!div class="mx-imgBorder"]
29
-
> 
29
+
> 
30
30
31
31
## Sync configuration files after a push
32
32
This action syncs Azure App Configuration files when a change is pushed to `appsettings.json`. When a developer pushes a change to `appsettings.json`, the App Configuration Sync action updates the App Configuration instance with the new values.
33
33
34
-
The first section of this workflow specifies that the action triggers *on* a *push* containing `appsettings.json` to the *master* branch. The second section lists the jobs run once the action is triggered. The action checks out the relevant files and updates the App Configuration instance using the connection string stored as a secret in the repository. For more information about using secrets in Github, see [GitHub's article](https://help.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) about creating and using encrypted secrets.
34
+
The first section of this workflow specifies that the action triggers *on* a *push* containing `appsettings.json` to the *master* branch. The second section lists the jobs run once the action is triggered. The action checks out the relevant files and updates the App Configuration instance using the connection string stored as a secret in the repository. For more information about using secrets in GitHub, see [GitHub's article](https://help.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) about creating and using encrypted secrets.
35
35
36
36
```json
37
37
on:
@@ -58,9 +58,9 @@ jobs:
58
58
```
59
59
60
60
## Use a dynamic label on sync
61
-
The previous action updates the App Configuration instance whenever `appsettings.json` is updated. This action inserts a dynamic label on each sync, ensuring that each sync can be uniquely identified. This allows code changes to quickly be mapped to config changes.
61
+
The previous action updates the App Configuration instance whenever `appsettings.json` is updated. This action inserts a dynamic label on each sync, ensuring that each sync can be uniquely identified and allowing code changes to be mapped to config changes.
62
62
63
-
The first section of this workflow specifies that the action triggers *on* a *push* containing `appsettings.json` to the *master* branch. The second section runs a job which creates a unique label for the config update based on the commit hash. The job then updates the App Configuration instance with the new values and the unique label for this update.
63
+
The first section of this workflow specifies that the action triggers *on* a *push* containing `appsettings.json` to the *master* branch. The second section runs a job that creates a unique label for the config update based on the commit hash. The job then updates the App Configuration instance with the new values and the unique label for this update.
64
64
65
65
```json
66
66
on:
@@ -92,9 +92,9 @@ jobs:
92
92
```
93
93
94
94
## Use strict sync
95
-
When strict mode is enabled, the sync ensures that the App Configuration instance matches the configuration file for the given prefix and label exactly. Key-value pairs with the same prefix and label that are not in the configuration file are deleted.
95
+
When strict mode is enabled, the sync ensures that the App Configuration instance matches the configuration file for the given prefix and label exactly. Key-value pairs with the same prefix and label that aren't in the configuration file are deleted.
96
96
97
-
If strict mode is not enabled, the sync will only set key-values from the configuration file. No key-value pairs will be deleted.
97
+
If strict mode isn't enabled, the sync will only set key-values from the configuration file. No key-value pairs will be deleted.
98
98
99
99
```json
100
100
on:
@@ -167,7 +167,7 @@ jobs:
167
167
depth: 2
168
168
```
169
169
170
-
Given a depth of 2, the example above now returns the following key:value pair:
170
+
Given a depth of 2, the example above now returns the following key-value pair:
171
171
172
172
| Key | Value |
173
173
| --- | --- |
@@ -182,7 +182,7 @@ Input parameters specify data used by the action during runtime. The following
182
182
183
183
| Input name | Required? | Value |
184
184
|----|----|----|
185
-
| configurationFile | Yes |Path to the configuration file in the repository, relative to the root of the repository. Glob patterns are supported and can include multiple files. |
185
+
| configurationFile | Yes |Relative path to the configuration file in the repository. Glob patterns are supported and can include multiple files. |
186
186
| format | Yes | File format of the configuration file. Valid formats are: JSON, YAML, properties. |
187
187
| connectionString | Yes | Connection string for the App Configuration instance. The connection string should be stored as a secret in the GitHub repository, and only the secret name should be used in the workflow. |
188
188
| separator | Yes | Separator used when flattening the configuration file to key-value pairs. Valid values are: . , ; : - _ __ / |
0 commit comments