App Configuration Azure Syncing multiple properties files from Git repo

Praveen Ramachandran 60 Reputation points
2023-01-24T17:45:16.85+00:00

Dear people,

Thank you for answering my previous questions. This forum is very helpful.

I have a properties repo where I store multiple property files(Shared & tenant specific)  for QA, dev ,prod & sync them to Azure App configuration using git workflow action. As of now I can only sync one file to the app config but there is a requirement to sync multiple files to App configuration which I am not sure how to proceed.

Does anyone dealt with a similar situation ?

on: 
  push: 
    branches: 
      - 'main' 
    #paths: 
     # - dev/application.yaml
 
jobs: 
  syncconfig: 
    runs-on: ubuntu-latest 
    steps: 
      # checkout done so that files in the repo can be read by the sync 
      - uses: actions/checkout@v1 
      - uses: azure/appconfiguration-sync@v1 
        with: 
          configurationFile: 'shared/app-settings.yaml' 
          format: 'yaml' 
          # Replace <ConnectionString> with the name of the secret in your                        
          # repository 
          connectionString: ${{ secrets.APP_CONFIG_CONNECT }} 
          separator: ':'
Azure App Configuration
Azure App Configuration
An Azure service that provides hosted, universal storage for Azure app configurations.
237 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,341 Reputation points
    2023-01-31T14:42:11.3133333+00:00

    @Praveen Ramachandran Thanks for posting it in Microsoft Q&A and glad that the community is helpful. Based on my understanding, you have multiple configuration files for different environments, and like to sync the files to Azure App Configuration using GitHub Actions Workflow.

    You can follow step by step instructions in doc: Sync multiple files in one action and as you note below config file names are separated by comma:

    on:
      push:
        branches:
          - 'main'
        paths:
          - 'appsettings.json'
          - 'appsettings2.json'
    
    jobs:
      syncconfig:
        runs-on: ubuntu-latest
        steps:
          # checkout done so that files in the repo can be read by the sync
          - uses: actions/checkout@v1
          - uses: azure/appconfiguration-sync@v1
            with:
              configurationFile: '{appsettings.json,appsettings2.json}'
              format: 'json'
              # Replace <ConnectionString> with the name of the secret in your repository
              connectionString: ${{ secrets.<ConnectionString> }}
              separator: ':'
    

    I hope this helps with your question and let me know if you have any other.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.