Skip to content

FtrOnOff/export-manifest-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

FtrIO Export Manifest Action

GitHub Action that scans a .NET codebase for FtrIO [Toggle] usage and exports a manifest of required toggle keys. Use as the first step in a deployment safety pipeline, pairing with release-check-action to gate deployments on missing config.

Part of the FtrIO ecosystem — free, open source feature toggles for .NET.


What it does

Scans your .cs files for every [Toggle], [ToggleAsync], and manual toggle call and writes a JSON manifest listing every toggle key the codebase uses. The manifest is uploaded as a build artifact so downstream deployment pipelines can download it and validate it against a target config before deploying.

The manifest contains only key names and source locations — no config values, no secrets. It is safe to upload as a public artifact.

Manifest format:

{
  "generatedAt": "2026-06-21T16:00:00Z",
  "toggles": [
    { "key": "SendWelcomeEmail", "source": "[Toggle]",     "file": "Services/EmailService.cs",       "line": 17 },
    { "key": "NewCheckoutFlow",  "source": "[Toggle]",     "file": "Services/OrderService.cs",       "line": 42 },
    { "key": "PaymentV2",        "source": "[ToggleAsync]","file": "Services/PaymentService.cs",     "line": 88 },
    { "key": "BetaSearch",       "source": "ManualCall",   "file": "Controllers/SearchController.cs","line": 23 }
  ]
}

Quick start

- uses: actions/checkout@v4

- uses: FtrOnOff/export-manifest-action@v1
  with:
    source: ./src

The manifest is written to toggles.manifest.json and uploaded as a build artifact named toggle-manifest.


Inputs

Input Default Description
source . Directory to scan for .cs files
output toggles.manifest.json Path to write the manifest JSON
upload-artifact true Upload the manifest as a GitHub Actions artifact
artifact-name toggle-manifest Name of the uploaded artifact
artifact-retention-days 30 Days to retain the artifact
version (latest) Pin a specific version of FtrIO.onetwo

Outputs

Output Description
manifest-path Path to the generated manifest file
toggle-count Number of toggle keys found
artifact-name Name of the uploaded artifact

Examples

Minimal

- uses: actions/checkout@v4

- uses: FtrOnOff/export-manifest-action@v1

Custom source and output path

- uses: FtrOnOff/export-manifest-action@v1
  with:
    source: ./src
    output: ./artifacts/toggles.manifest.json

Skip artifact upload

- uses: FtrOnOff/export-manifest-action@v1
  with:
    source: ./src
    upload-artifact: false

Useful when both export and release-check run in the same job and the manifest can be passed directly via the filesystem.


Use outputs in later steps

- uses: FtrOnOff/export-manifest-action@v1
  id: manifest

- name: Print summary
  run: |
    echo "Manifest written to ${{ steps.manifest.outputs.manifest-path }}"
    echo "Found ${{ steps.manifest.outputs.toggle-count }} toggles"

Full CI workflow with deployment safety

name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-dotnet@v5
        with:
          dotnet-version: '8.0.x'

      - name: Build
        run: dotnet build

      - name: Test
        run: dotnet test

      - name: Export FtrIO toggle manifest
        uses: FtrOnOff/export-manifest-action@v1
        with:
          source: ./src
          artifact-name: toggle-manifest
          artifact-retention-days: 30

The manifest artifact is retained for 30 days — long enough for the deployment pipeline to download it at release time.


Pairing with release-check-action

This action is the first half of FtrIO's deployment safety pipeline. The second half is release-check-action, which downloads the manifest from the build artifact and validates it against the target environment's config before deploying.

App CI pipeline                      Deployment pipeline
────────────────────────────────     ────────────────────────────────
export-manifest-action           →   release-check-action
Scans source for [Toggle] keys        Downloads manifest artifact
Uploads toggles.manifest.json         Fetches target appsettings.json
                                      Checks every key is present
                                      Blocks deploy if any are missing

App CI (build.yml):

- uses: FtrOnOff/export-manifest-action@v1
  with:
    source: ./src
    artifact-name: toggle-manifest

Deployment pipeline (deploy.yml):

- uses: FtrOnOff/release-check-action@v1
  with:
    artifact-name: toggle-manifest
    config-url: ${{ secrets.PRODUCTION_CONFIG_URL }}
    fail-on-missing: true

- name: Deploy
  needs: release-check
  run: echo "deploying..."

The FtrIO ecosystem

Tool Purpose
FtrIO Core library. [Toggle] attribute woven into IL at compile time.
FtrIO.Toaster Self-hosted Docker UI for managing toggles live.
FtrIO.onetwo CLI audit tool. This action wraps it.
ftrio-action General toggle audit action for CI.
release-check-action Gate deployments on missing toggle config.

Full docs: ftronoff.github.io/FtrIO

About

GitHub Action that scans a .NET codebase for FtrIO [Toggle] usage and exports a manifest of required toggle keys. Use as the first step in a deployment safety pipeline. Wraps FtrIO.onetwo.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors