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

Target and replace XML connectionStrings node #41

Description

I am attempting to change a cnfgConnection.config > "connectionString" value using the following action and settings.

How do I target the connectionStrings > add > connectionString value?

- uses: microsoft/variable-substitution@v1 
   with:
       files: './Website/cnfgConnection.config'
   env:
          connectionStrings.add: "Data Source=prod.server.com;Initial Catalog=test;User ID=prod_tester;Password=xxxxxx"

Example XML

<?xml version="1.0"?>
<connectionStrings>
  <add name="DefaultConnectionString" connectionString="Data Source=test.server.com;Initial Catalog=test;User ID=tester;Password=xxxxxx" providerName="System.Data.SqlClient"/>
</connectionStrings>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions