Convention based variable substituion

Currently looking to switch out Bitbucket, TeamCity and Octopus for GHE and migrating some of our projects. In Octopus Deploy, there’s a concept for poking misc. configuration files calles Structured Configuration Variables. Basically you define a file (or wild card pattern)and this feature will, by convention, iterate over all defines variables (think repo, environment and org. secrets) and switch out any matching configuration in that file.

A secret named config:logUrl with the value someProdLogValue scoped for the Prod environment, will match and poke the logUrl in the following json file

  "config": {
    "dbVersion": "1",
    "appName": "SomeApp",
    "versionnumber": "0",
    "environment": "debug",
    "logUrl": "someDevLogValue",

I’ve found a couple of actions doing variable substitution, e.g. GitHub - microsoft/variable-substitution: Enable GitHub developers to parameterize the values in their config files from a GitHub Action workflow, but they seem very explicit and verbose and not very convention based. For some of our projects we have 100+ variables settings.

So: my question is if someone knows an action that mimics Octopus deploys convention based variable substitution, where you do not have to define every variable that needs to be poked, but is based on the secrets available to this repo, environment, etc.?

Any information is greatly appreciated!