Skip to content

(v1.4) Github Actions Variable Substitution

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Sep 23:32

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: 

Released under MIT license