GitHub action for importing configuration files to Azure App Configuration
Перейти к файлу
Christine Wanjau 91808c85bb
Merge pull request #58 from Azure/ChristineWanjau-patch-1
Update action.yml description
2024-09-09 21:26:29 +03:00
.github run tests on creating a Pull request 2024-04-24 20:23:23 +03:00
lib Update strings as sugggested 2024-07-22 10:26:08 +03:00
src Update strings as sugggested 2024-07-22 10:26:08 +03:00
tests run tests on creating a Pull request 2024-04-24 20:23:23 +03:00
.eslintrc.json run tests on creating a Pull request 2024-04-24 20:23:23 +03: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 update link 2024-07-22 10:28:04 +03:00
SECURITY.md Initial SECURITY.md commit 2019-11-14 19:58:51 -08:00
action.yml Update action.yml 2024-09-09 20:51:26 +03:00
babel.config.js upgraded npm packages 2024-04-22 15:06:59 +03:00
jest.config.js upgraded npm packages 2024-04-22 15:06:59 +03:00
package-lock.json updated package-lock.json 2024-04-23 09:14:47 +03:00
package.json run tests on creating a Pull request 2024-04-24 20:23:23 +03:00
tsconfig.json Initial code for Github sync action (#1) 2019-12-04 17:26:10 -08:00

README.md

Deprecation Notice

This GitHub action has been deprecated. The Azure CLI for Azure App Configuration provides full capabilities for importing configuration files into Azure App Configuration. Follow these instructions to set it up in your GitHub actions.

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.