Tooling that allows you to sync configuration files stored locally or on GitHub with the Valued API.
You can create a single configuration file called valued.[ext]
or .valued.[ext]
either at the top level, or inside a directory called config
or .config
.
Replace .[ext]
with .json
, .yaml
, or .toml
, based on which format you prefer.
.config/valued.yml
goals:
- name: Example goal
action_key: action1
- name: Other goal
action_key: action2
threshold: 5
You can also create a configuration directory called valued
, .valued
, config/valued
, or .config/valued
and add specific configuration files for goals and signals.
.valued/goals.toml
["Example goal"]
action-key = "action1"
["Other goal"]
action-key = "action2"
threshold = 5
You need to obtain a token for the Valued API. You can find these in the Valued app under your project's "Integrations" page. Add this as an action secret (from your repository on GitHub, go to "Settings" > "Secrets and Variables" > "Actions"). The examples below assume you named the secret VALUED_TOKEN
.
You can add the following step to your workflow:
- uses: valued-app/config-sync@main
with:
token: ${{ secrets.VALUED_TOKEN }}
A full workflow only pushing the configuration might look like this:
name: valued-config-sync
on:
push:
branches: [main]
jobs:
config-upload:
runs-on: ubuntu-latest
steps:
- name: Upload Valued configuration
uses: valued-app/config-sync@main
with:
token: ${{ secrets.VALUED_TOKEN }}
See docs/library.md.