Skip to content
Skip to content

GitHub Action

Run codebase analysis as part of your CI pipeline.

Generate an API key

The GitHub Action authenticates with Implera using an API key. Generate one from your account settings:

  1. Go to Settings > API Keys > Generate.
  2. Copy the key. It is shown once and cannot be retrieved later.
  3. In your GitHub repository, go to Settings > Secrets and variables > Actions.
  4. Create a new repository secret named IMPLERA_API_KEY and paste the key.

Add to your workflow

Add the Implera quality check step to any workflow. A minimal example that runs on every pull request:

name: Code Quality
on: [pull_request]
jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - uses: implera/quality-check@v1
        with:
          api-key: ${{ secrets.IMPLERA_API_KEY }}

That is all you need. The Action handles checkout, analysis and reporting automatically.

What the Action does

When the Action runs, it calls the Implera API to trigger deterministic analysis on the current branch. It then evaluates the results against the quality gates configured in your project settings and prints a formatted summary to the CI log.

Example output:

==================================================
  Implera — Codebase Quality Score: 72/100
==================================================

  Quality gate:
    [OK] Security          85 / 70
    [OK] Architecture      72 / 60
    [OK] Maintainability   78 / 60

  Quality gate: PASSED
==================================================

If any domain fails its threshold, the Action exits with a non-zero code and the CI job fails. The log clearly shows which domains did not meet their thresholds.

Configuration

Quality gate thresholds are read from your Implera project settings. This means your thresholds are a single source of truth whether you use the GitHub App, the Action or the REST API.

The Action accepts the following inputs:

InputRequiredDefaultDescription
api-keyYesYour Implera API key.
fail-on-gateNotrueWhether the job should fail when the quality gate fails. Set to false for informational runs.

To run analysis without blocking the pipeline, set fail-on-gate: false. The summary still prints to the log but the job always passes.

Troubleshooting

Common issues and how to resolve them:

Invalid API key

Check that the secret name in your workflow matches exactly: IMPLERA_API_KEY. Regenerate the key in Implera if the original was lost.

Repository not connected

The repository must be connected to an Implera project before the Action can analyse it. Go to your project settings and link the repository through the GitHub App.

Timeout on large repositories

Analysis of large repositories (10,000+ files) may take 30 to 60 seconds. The Action waits automatically, but if your CI runner has a short step timeout you may need to increase it.