1.1.0 • Published 8 months ago

vwo-fme-github-action v1.1.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
8 months ago

VWO FME GitHub Action

This GitHub Action allows you to evaluate feature flags using the VWO platform. Evaluating feature flags can be useful in CI/CD pipelines to dynamically enable/disable features or retrieve feature flag values during builds. Feature flag variables enable dynamic assignment of values based on the flag's configuration, helping to eliminate hardcoded values from the codebase.

Inputs

Input NameDescriptionRequired
flagsWithVariablesA JSON with the feature flag keys and their default values.Yes
userContextThe context of the user for which the flag needs to be evaluated.Yes
sdkInitOptionsOptional JSON configuration for initializing the VWO SDK.No

Outputs

Output NameDescription
flagKeyThe status of the feature flag (true or false). Example: ${{ steps.vwo_action.outputs.flagKey }}.
flagKey_variableKeyThe value of the associated variable for the feature flag. Example: ${{ steps.vwo_action.outputs.flagKey_variableKey }}.

Note: flagKey and flagKey_variableKey are dynamic placeholders. The actual key names will be replaced based on the feature flags you are working with. For example, if the feature flag is featureA, you would access its status as ${{ steps.vwo_action.outputs.featureA }} and a variable within that flag as ${{ steps.vwo_action.outputs.featureA_someVariableKey }}.

Environment Variables

Environment VariableDescriptionRequired
VWO_SDK_KEYThe SDK key used to initialize the VWO SDK.Yes
VWO_ACCOUNT_IDThe account ID of the VWO project.Yes

Usage Example

name: Feature Flag Management

on:
  push:
    branches:
      - main

jobs:
  feature-flag-evaluation:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Evaluate Feature Flags
        uses: wingify/vwo-fme-github-action@v1.0.0
        with:
          flagsWithVariables: |
            {
              "feature-flag-key-1": {
                "variable-key-1": "variable-default-value"
              },
              "feature-flag-key-2": {
                "variable-key-1": "variable-default-value"
              }
            }
          userContext: |
            {
              "id": "your-user-id"
            }
          sdkInitOptions: |
            {
              "logger": {
                "level": "DEBUG"
              }
            }
        env:
          VWO_SDK_KEY: ${{ secrets.VWO_SDK_KEY }}
          VWO_ACCOUNT_ID: ${{ secrets.VWO_ACCOUNT_ID }}

Authors

Changelog

Refer CHANGELOG.md

Contributing

Please go through our contributing guidelines

Code of Conduct

Code of Conduct

License

Apache License, Version 2.0

Copyright 2024 Wingify Software Pvt. Ltd.

1.1.0

8 months ago

1.0.0

8 months ago