Skip to content
Shareglow

CI

GitHub Action

Scans pages with POST /v1/scan, fails the workflow when a page has Open Graph errors (a missing og:title, og:image, ...) and keeps one preview comment on the pull request, edited in place on every re-run.

01

Usage

Create an API key under Developer, store it as the repository secret SHAREGLOW_API_KEY, then add a step. Pin a release tag (for example @v1) or a full commit SHA rather than main.

.github/workflows/og-preview.yml
on: pull_request
permissions:
  pull-requests: write
jobs:
  og-preview:
    runs-on: ubuntu-latest
    steps:
      - uses: Brandon-35/shareglow/packages/github-action@v1
        with:
          api-key: ${{ secrets.SHAREGLOW_API_KEY }}
          urls: |
            https://preview-${{ github.event.pull_request.number }}.example.com/

02

Inputs and outputs

  • api-key (default: required) Shareglow API key (sk_live_...). Pass it from a repository secret. Never printed in the log.
  • urls (default: required) Pages to scan, one URL per line, at most 20 (every scan is a metered API call).
  • fail-on (default: error) error, warning or never. A page that cannot be scanned always fails, unless never.
  • comment (default: true) Post or update the pull request comment. The step summary is still written when false.
  • github-token (default: ${{ github.token }}) Token used to post the PR comment. Needs pull-requests: write.
  • api-url (default: https://app.getshareglow.com) Shareglow API origin.

Output result is pass or fail. Outside a pull_request event no comment is posted.

03

How it runs

The action has no dependencies and runs on Node 22. The pages you list are fetched by the Shareglow scanner, which blocks private IPs and caps redirects and size. The action itself only talks to the Shareglow and GitHub APIs, with a timeout, a response size cap and no redirects.