GitHub Actions Barcode Scanner

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

Add the step after actions/checkout

Runs on GitHub-hosted Linux (glibc 2.28+), macOS and Windows x64. No secrets needed.

  1. 1

    Add this step to .github/workflows/ (pin to a full commit SHA in production workflows).

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

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

  3. 3

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

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

GitHub Marketplace

Automate barcode verification in CI pipelines

Catch broken labels, missing payloads and unreadable exports automatically before code merges or ships.

Assert expected payloads

Use files globs and expected strings with fail-on: missing (default) so a mistyped or truncated barcode stops the build.

Structured JSON & job summary

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

Deterministic CI defaults

Defaults to profile: full and budget-ms: 0 (no time limit) for repeatable runner verdicts, with workflow commands disabled around logs.

Try a barcode image in GitHub Actions

Prepare a known test image, run the scan and verify the returned value character for character.

barcode-reference.png

Create a Code 128 barcode that contains 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 verifies qrscan by SHA-256, matches the exact Code 128 string and sets steps.codes.outputs.result to pass.

Example result for barcode-reference.png.

GitHub Actions Barcode Scanner questions

Workflow inputs, three-layer SHA-256 verification, glibc runners, log safety and licensing.

Add a step using qrcode-ai-com/qrcode-barcode-scanner-action@v1 (or pin to a full commit SHA) after actions/checkout, and provide workspace globs in files plus optional strings in expected. See the listing on GitHub Marketplace.

No. It downloads the official qrscan release archive anonymously over HTTPS, requests no extra workflow permissions and needs no QR Code AI account or API key.

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

GitHub-hosted Linux (x64 and arm64 with glibc 2.28 or later), macOS (Apple silicon and Intel) and Windows x64. Alpine or other musl Linux containers are refused before downloading.

fail-on defaults to missing (fails if any expected payload is absent). Set no-code to also fail on matched images containing zero codes, or never to report only. Unreadable files, patterns matching zero files and faults always fail the step.

expected compares exact strings verbatim, so leading zeros on EAN-13, UPC-A or ITF codes must match character for character. The action reads 16 barcode symbologies plus QR codes without querying external product databases.

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

GitHub Actions setup and Barcode Scanner references

Use the official listing and README for installation details, limits and supported formats.