This repository has been archived. The project became obsolate after the release of ConfigCat's Scan Repository GitHub Action.
This GitHub Action is a utility that discovers ConfigCat feature flag usages in your source code and validates them against your own feature flags on the ConfigCat Dashboard. Documentation: https://github.com/configcat/feature-flag-reference-validator
-
Get your SDK Key from ConfigCat Dashboard and store it as a GitHub secret under the name
CONFIG_CAT_SDK_KEY. -
Create a new Actions workflow in your GitHub repo.
- If you already have an
action.ymlfile: Copy and paste theConfigCatFeatureFlagCleanupjob declaration below into the jobs section in youraction.ymlfile. - If you don't already have a workflow file: Create a new file titled
action.ymlin the.github/workflowsdirectory of your repository. Copy and paste the following code toaction.yml.
on: push name: Example Workflow jobs: ConfigCatFeatureFlagCleanup: name: ConfigCat Feature Flag Cleanup runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - name: ConfigCat Feature Flag Cleanup uses: configcat/[email protected] with: configcat-sdk-key: ${{ secrets.CONFIG_CAT_SDK_KEY }} fail-on-warnings: false
- If you already have an
We strongly recommend that you update the second uses attribute value to reference the latest tag in the configcat/github-action-feature-flag-cleanup repository. This pins your workflow to a latest version of the action.
- Commit & push
action.yml.
Feature Flag Cleanup Action will run on any push event.
Will not block PR approvals until you set
fail-on-warnings: true.
Add these to the with section to enable more functionality.
| Parameter | Description | Default |
|---|---|---|
configcat-sdk-key |
The SDK Key for your feature flags & settings. | CONFIG_CAT_SDK_KEY |
scan-directory |
The directory to run flag validations on. | . |
configcat-cdn-server |
To set a custom ConfigCat CDN server. | cdn.configcat.com |
fail-on-warnings |
Show warnings or stop on a build error when validation fails. | false |
debug |
More verbose logging. | false |