GitHub Actions Barcode Scanner

Check committed 1D and 2D barcode images automatically on every push or pull request. Validates qrscan with pinned SHA-256 hashes and asserts exact strings with leading zeros intact.

Place the step after actions/checkout

Supports GitHub-hosted Linux (glibc 2.28+), macOS and Windows x64. No secrets required.

  1. 1

    Drop this step into .github/workflows/ (pin to a full commit SHA for production workflows).

    Text
    - uses: qrcode-ai-com/qrcode-barcode-scanner-action@v1
      id: codes
      with:
        files: barcode-reference.png
        expected: STOCK-4827
  2. 2

    Configure image globs under files (with ! exclusions, max-files default 100) and exact payloads under expected.

  3. 3

    Inspect steps.codes.outputs.result, the escaped job summary or the complete JSON report file at report-path.

Checks SHA256SUMS, release archive and qrscan executable against pinned hashes before scanning. Alpine/musl containers are rejected.

GitHub Marketplace

Automate barcode checks across CI pipelines

Flag broken labels, missing payloads and unreadable image exports automatically before changes merge or ship.

Assert expected payloads

Combine files globs and expected values with fail-on: missing (default) so any mistyped or truncated barcode stops the build.

Structured JSON & job summary

Read result, compact report JSON (schema qrcode-barcode-scanner-action/1), full report-path with base64 raw bytes and qrscan-path.

Deterministic CI defaults

Ships with profile: full and budget-ms: 0 (unlimited time) for consistent runner results, while workflow commands stay disabled around logs.

Test a barcode image in GitHub Actions

Save a known reference image, trigger the workflow scan and confirm the decoded string character for character.

barcode-reference.png

Create a Code 128 barcode encoding STOCK-4827 and save it as barcode-reference.png.

Run the scan in GitHub Actions

Text
jobs:
  codes:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v7
      - name: Verify barcode-reference.png
        id: codes
        uses: qrcode-ai-com/qrcode-barcode-scanner-action@v1
        with:
          files: barcode-reference.png
          expected: STOCK-4827
      - run: echo "Result: ${{ steps.codes.outputs.result }}"
Expected result · Code 128
STOCK-4827

GitHub Actions validates qrscan via SHA-256, matches the exact Code 128 string and sets steps.codes.outputs.result to pass.

Sample output for barcode-reference.png.

GitHub Actions Barcode Scanner questions

Workflow inputs, three-layer SHA-256 checks, glibc runners, log hardening and licensing.

Insert a step referencing qrcode-ai-com/qrcode-barcode-scanner-action@v1 (or pin to a full commit SHA) after actions/checkout, supplying workspace globs in files and optional target strings in expected. View the official entry on GitHub Marketplace.

No. It pulls the official qrscan release archive anonymously over HTTPS, needs no extra repository permissions and requires neither a QR Code AI account nor an API key.

It verifies the fetched SHA256SUMS file against its pinned digest, checks the release archive against SHA256SUMS and verifies the extracted qrscan binary against its pinned digest. Any mismatch aborts the step before execution.

GitHub-hosted Linux (x64 and arm64 with glibc 2.28 or newer), macOS (Apple silicon and Intel) and Windows x64. Alpine and other musl Linux containers are rejected before any download begins.

fail-on defaults to missing (fails whenever an expected payload is not found). Set no-code to fail on matched files containing zero codes as well, or never for reporting only. Unreadable files, patterns matching zero files and runtime faults always fail the step.

expected checks strings verbatim, so leading zeros on EAN-13, UPC-A or ITF labels must match character for character. The action decodes 16 barcode symbologies alongside QR codes without querying external product catalogues.

Yes. Both the action repository and current qrscan releases are free and MIT-licensed (with retained Apache-2.0 notices for two reader components). CI scanning never consumes QR Code AI generation credits or paid plans.

GitHub Actions setup and Barcode Scanner references

Check the official listing and README for workflow options, runner limits and supported formats.