GitHub action for importing configuration files to Azure App Configuration
Перейти к файлу
Balaga Gayatri 33d4121cc9
Steps for onboarding azure/AppConfiguration-Sync action to the healthdashboard (#20)
* Create defaultLabels.yml

* Create bug-report---feature-request.md
2021-07-12 15:06:42 -07:00
.github Steps for onboarding azure/AppConfiguration-Sync action to the healthdashboard (#20) 2021-07-12 15:06:42 -07:00
lib Bump lodash from 4.17.19 to 4.17.21 (#17) 2021-07-07 04:50:00 -07:00
src Add support for specifying content type (#10) 2020-04-20 13:54:45 -07:00
tests Add support for specifying content type (#10) 2020-04-20 13:54:45 -07:00
.eslintrc.json Initial code for Github sync action (#1) 2019-12-04 17:26:10 -08:00
.gitignore Initial commit 2019-11-14 19:53:23 -08:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2019-11-14 19:58:46 -08:00
LICENSE Updating LICENSE to template content 2019-11-14 19:58:48 -08:00
README.md Don't require strict and remove strict from the readme example (#5) 2020-01-08 16:08:58 -08:00
SECURITY.md Initial SECURITY.md commit 2019-11-14 19:58:51 -08:00
action.yml Add support for specifying content type (#10) 2020-04-20 13:54:45 -07:00
jest.config.js Initial code for Github sync action (#1) 2019-12-04 17:26:10 -08:00
package-lock.json Bump lodash from 4.17.19 to 4.17.21 (#17) 2021-07-07 04:50:00 -07:00
package.json Bump lodash from 4.17.19 to 4.17.21 (#17) 2021-07-07 04:50:00 -07:00
tsconfig.json Initial code for Github sync action (#1) 2019-12-04 17:26:10 -08:00

README.md

Azure App Configuration Sync

This action syncs configuration files in the repository to an App Configuration instance. This enables scenarios where the App Configuration instance is automatically updated when changes are made through GitHub workflows.

JSON, YAML, and .properties files are supported. For the full list of action inputs, see Inputs.

To start using this GitHub action, go to your repository and click the "Actions" tab. This GitHub action will be available from the marketplace under the name "Azure App Configuration Sync". See the usage section below for an example of how to set up the action yml file. For a more in-depth view of GitHub workflows and actions click here.

Connection string

The connection string for the App Configuration instance should be stored as a secret in the GitHub repository. The secret should be used in the workflow.

Usage example

The following example updates the App Configuration instance each time a change is made to appsettings.json in the master branch.

# File: .github/workflows/syncConfiguration.yml

on:
  push:
    branches:
      - 'master'
    paths:
      - 'appsettings.json'

jobs:
  syncconfig:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: azure/appconfiguration-sync@v1
        with:
          configurationFile: 'appsettings.json'
          format: 'json'
          # Replace <ConnectionString> with the name of the secret in your repository
          connectionString: ${{ secrets.<ConnectionString> }}
          separator: ':'

Building

First make sure that you have Node.js 12.x or higher. Then run npm install to install dependencies.

To build the project, run npm run build. The build output is placed at lib\index.js and should be included in your pull request.

Before submitting a pull request, ensure that lint and tests pass by running npm run lint and npm run test.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.