A GitHub Action that fetches the composite travel-safety score for a country from the Warnely Public API and exposes it as outputs to downstream workflow steps. Useful for go/no-go gates in trip-planning automations, duty-of-care dashboards, and CI checks that involve travel decisions.
Zero auth, zero secrets. Composite action that uses curl + jq; no Docker container or Node runtime needed.
- uses: sn-lui/warnely-action@v1 id: thailand with: country: TH - name: Print the score run: | echo "Thailand risk score: ${{ steps.thailand.outputs.score }}/100" echo "Thailand tier: ${{ steps.thailand.outputs.tier }}"
- uses: sn-lui/warnely-action@v1 with: country: MX fail-above: 60 # fail if score > 60 warn-above: 35 # warn if score > 35
| Input | Required | Default | Description |
|---|---|---|---|
country |
yes | — | ISO 3166-1 alpha-2 code (case-insensitive). e.g. TH, GB, US. |
fail-above |
no | 100 |
Fail the action if score strictly exceeds this threshold (0-100). 100 = never fail. |
warn-above |
no | 55 |
Emit a workflow warning if score strictly exceeds this. 55 = the High Risk tier boundary. |
| Output | Example |
|---|---|
score |
38 |
tier |
Exercise Increased Caution |
name |
Thailand |
region |
Asia |
summary |
One-paragraph editorial summary |
fcdo |
UK FCDO alert status (comma-joined; empty if none) |
state-dept |
US State Department advisory level (1–4; empty if none) |
The action also writes a ## 🛡️ Warnely safety check block to $GITHUB_STEP_SUMMARY so the result appears inline on the workflow run page without needing to surface the outputs explicitly.
name: Nightly travel safety check on: schedule: [{ cron: '0 7 * * *' }] workflow_dispatch: jobs: check: runs-on: ubuntu-latest strategy: matrix: country: [TH, ID, EG, MX, ZA] steps: - uses: sn-lui/warnely-action@v1 with: country: ${{ matrix.country }} fail-above: 60
- Zero secrets — the Warnely API requires no auth.
- Stable contract — the
/v1path is versioned; breaking changes ship behind/v2. - Open data — released under CC BY 4.0; commercial CI use is allowed with attribution.
- No Docker pull, no Node runtime — composite action using
curl + jqonly.
The Warnely dataset is licensed CC BY 4.0. If you publish work derived from it, attribute Warnely with a link to https://warnely.com.
- OpenAPI spec + Python/TS SDKs: sn-lui/warnely-openapi
- CLI: sn-lui/warnely-cli
- Interactive docs: warnely.com/api-docs