GitHub Action guide
The Node 24 action performs no repository mutation, does not read GITHUB_TOKEN, and works with permissions: {} unless another step independently needs permissions.
The Action is supported only for development or testing of software associated with the repository containing the workflow. Do not use GitHub-hosted runners for generic monitoring, scheduled scraping, proxy workloads, or unrelated third-party page checks.
Run a free diagnosis
No account or API key is needed for a direct check. This pinned command tests a harmless public example:
npx --yes github:sanjayamaharjancodes/scrape-diagnose#abe305a38cee37a0287d5bb9d1097964759b8c72 -- https://example.com/ --expect-text "Example Domain"
Direct check
name: scrape-contract
on:
workflow_dispatch:
permissions: {}
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: sanjayamaharjancodes/scrape-diagnose@abe305a38cee37a0287d5bb9d1097964759b8c72
id: diagnose
with:
mode: diagnose
target-url: https://example.com/
expect-text: Example Domain
live: "false"
timeout-seconds: "30"
report-path: artifacts/scrape-diagnose.json
fail-on: non-pass
- run: echo "Result is $"
The report path must be relative and remain inside GITHUB_WORKSPACE. The action rejects absolute paths, traversal, existing symlinks/junctions, existing destination files, control characters, and unsupported input values.
Budgeted provider fallback
- uses: sanjayamaharjancodes/scrape-diagnose@abe305a38cee37a0287d5bb9d1097964759b8c72
with:
mode: diagnose
target-url: https://example.com/
expect-text: Required marker
live: "true"
api-key: $
max-total-credits: "25"
max-paid-probes: "3"
fail-on: fail
The key is masked before parsing any other input. It is used only in requests to https://api.scraperapi.com and is never included in the report or outputs.
Do not run a secret-bearing configuration on pull_request_target. For workflows where fork or Dependabot contexts do not receive secrets, skip-if-key-missing defaults to true: the action emits a sanitized SKIPPED report and makes no network request. Set it to false only when a missing secret should be treated as a configuration failure.
Inputs
| Input | Default | Boundary |
|---|---|---|
mode |
diagnose |
diagnose, account, cost, or probe |
target-url |
none | one public HTTP(S) URL |
api-key |
none | use a secret expression only |
live |
false |
enables fallback after direct failure |
expect-text |
none | 1–512 characters; value is not reported |
render |
false |
explicitly enable provider rendering |
premium |
false |
explicitly enable premium proxies |
country-code |
none | two lowercase/uppercase letters |
max-total-credits |
25 |
integer 1–100,000 |
max-paid-probes |
3 |
integer 1–3 |
timeout-seconds |
75 |
integer 1–120 per request |
report-path |
scrape-diagnose-report.json |
relative workspace path |
fail-on |
fail |
fail, non-pass, or never |
skip-if-key-missing |
true |
skip secret-dependent runs safely |
Outputs
status:PASS,FAIL, orSKIPPEDreport-path: sanitized relative JSON pathestimated-credits: cumulative committed estimatesobserved-credit-cost: cumulative provider-reported cost when every probe supplied it
The action does not upload artifacts automatically. Add an artifact step yourself only if the sanitized report should leave the runner.