GitHub Actions Barcode Scanner

Verify committed 1D and 2D barcode images on every push or pull request. Checks qrscan against pinned SHA-256 hashes and validates exact strings with leading zeros preserved.

Place the step right after actions/checkout

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

  1. 1

    Place this step inside .github/workflows/ (pin to a full commit SHA for production pipelines).

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

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

  3. 3

    Read steps.codes.outputs.result, inspect the escaped job summary or open the complete JSON report at report-path.

Checks SHA256SUMS, the release archive and the qrscan binary against pinned hashes prior to scanning. Alpine and musl containers are rejected.

GitHub Marketplace

Automate barcode checks across CI pipelines

Spot faulty labels, absent payloads and unreadable image exports automatically before changes merge or release.

Validate expected payloads

Combine files globs and expected strings with fail-on: missing (default) so a mistyped or clipped barcode halts the build.

Structured JSON & job summary

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

Deterministic CI defaults

Uses profile: full and budget-ms: 0 (no time limit) by default for repeatable CI outcomes, keeping workflow commands turned off around log lines.

Try a barcode image in GitHub Actions

Create a known reference image, run the workflow step and check the decoded value character by character.

barcode-reference.png

Create a Code 128 barcode encoding STOCK-4827 and save the file 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, confirms the exact Code 128 string and writes pass to steps.codes.outputs.result.

Sample output for barcode-reference.png.

GitHub Actions Barcode Scanner questions

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

Insert a step using qrcode-ai-com/qrcode-barcode-scanner-action@v1 (or pin to a full commit SHA) right after actions/checkout, supplying repository globs in files along with optional strings in expected. View the entry on GitHub Marketplace.

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

It validates 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 discrepancy stops the step before running.

GitHub-hosted Linux (x64 and arm64 running glibc 2.28 or newer), macOS (Apple silicon and Intel) and Windows x64. Alpine and other musl-based Linux containers are rejected prior to download.

fail-on defaults to missing (failing whenever an expected payload is absent). Choose no-code to also fail on matched images with zero codes, or never to report without failing. Unreadable files, patterns matching zero files and runtime faults always fail the step.

expected checks strings verbatim, so leading zeros in EAN-13, UPC-A or ITF codes must match character by character. The action supports 16 barcode symbologies plus QR codes without calling external retail databases.

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

GitHub Actions setup and Barcode Scanner references

Refer to the official marketplace entry and README for setup details, runner limits and supported formats.