Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

GitHub Action for Variable substitution in files

Latest
Compare
Choose a tag to compare
@N-Usha N-Usha released this 26 Nov 07:57
6287962

With the Variable Substitution Action for GitHub, you can apply variable substitution to XML, JSON and YAML based configuration and parameter files.

The definition of this Github Action is in action.yml.

End-to-End Sample Workflow

Sample workflow to apply Variable substitution on XML, JSON, YML files

# .github/workflows/var-substitution.yml
on: [push]
name: variable substitution in json, xml, and yml files

jobs:
  build:
    runs-on: windows-latest
    steps:
    - uses: microsoft/variable-substitution@v1 
      with:
        files: 'Application/*.json, Application/*.yaml, ./Application/SampleWebApplication/We*.config'
      env:
        Var1: "value1"
        Var2.key1: "value2"
        SECRET: ${{ secrets.SOME_SECRET }}

Released under MIT license