Skip to Content
flowpact

Shared workflows

Publish reusable workflows and actions without breaking the repositories that use them, and check the ones you use from other repositories.

A reusable workflow or action that other repositories call is an interface: its inputs, secrets and outputs, and the check names its jobs report. The repositories that call it pin a tag such as @v2 and take every release in it, and you cannot see their workflows or their branch protection. flowpact checks both sides of that interface.

When you publish

A published workflow or action is one other repositories can use: every reusable workflow but those whose file name starts with _, and the action at the repository's root (see Concepts).

In the GitHub Action, both are inputs:

.github/workflows/flowpact.yml
on:
  pull_request:
    # edited / labeled: grade again when the title or the labels change
    types: [opened, edited, synchronize, reopened, labeled, unlabeled]
permissions:
  contents: read
jobs:
  flowpact:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7       # pin to a commit SHA
      - uses: ciatlas/flowpact@v0.29    # pin to a commit SHA
        with:
          mode: check    # lint, and compare with the committed contracts
          impact: auto   # grade the change against the pull request title

When you use them

npx flowpact remotes update                          # record the interfaces, then commit the lockfile
npx flowpact remotes update --dry-run --fail-on breaks   # on a schedule: what changed, and what it breaks

Across an organization

Roll it out across an organization: organization defaults in a base config, organization rules as plugins, and the action wrapped in one of your own.

On this page