A Github Action wrapper for the Statsig Node JS server SDK.
Allows you to evaluate gates and configs directly within a github action.
Required Statsig server SDK key.
Required User JSON to use for evaluating. See StatsigUser.
Statsig environment tier.
Whether or not to log exposures. Default false
List of feature gates to evaluate separated by newline.
List of dynamic configs to evaluate separated by newline.
List of experiments to evaluate separated by newline.
List of events to log separated by newline.
The evaluated value of the gate
The param value of the evaluated config
The param value of the evaluated experiment
jobs:
statsig-example:
runs-on: ubuntu-latest
steps:
- name: Evaluate
id: statsig
uses: statsig-io/github-sdk
with:
sdk-key: 'secret-key'
user: '{ "userID": "test123", "email": "test123@statsig.com" }'
log-exposures: 'false'
gates: |
'example_gate_1'
'example_gate_2'
configs: 'example_config'
experiments: 'example_experiment'
events: |
{ "eventName": "example_event_1", "value": 1, "metadata": { "some string": "string", "some number": 123} }
{ "eventName": "example_event_2", "value": 2, "user": { "userID": "test456", "email": "test456@statsig.com" } }
- name: Print output
run: |
echo ${{ steps.statsig.outputs['gate::example_gate_1'] }}
echo ${{ steps.statsig.outputs['gate::example_gate_2'] }}
echo '${{ toJSON(steps.statsig.outputs['config::example_config::some key']) }}'
echo '${{ toJSON(steps.statsig.outputs['experiment::example_experiment::some param']) }}'
run: