Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Warnely Country Risk Check — GitHub Action

License: CC BY 4.0

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.

Use

- 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 }}"

Fail the workflow above a threshold

- uses: sn-lui/warnely-action@v1
 with:
 country: MX
 fail-above: 60 # fail if score > 60
 warn-above: 35 # warn if score > 35

Inputs

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.

Outputs

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.

Example workflow: nightly safety gate

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

Why use this

  • Zero secrets — the Warnely API requires no auth.
  • Stable contract — the /v1 path 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 + jq only.

Attribution

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.

Related

About

GitHub Action: composite travel-safety risk check for any country via the Warnely Public API. No auth, CC BY 4.0.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /