Files
openwaf/.github/workflows/geo-freshness.yml
T
Pavlo Ratushnyi bef197ec83 The honest-status comments now say what actually ran, and at what level
Three files said "this has never run". After executing the workflows with
nektos/act 0.2.89 on catthehacker/ubuntu:act-latest, that sentence was too
broad, and a status note that is too broad is the same mistake as one that is
too narrow. What is true, per file:

- ci.yml: all four jobs executed start to finish and reported success —
  lint (actionlint 1.7.12 and shellcheck 0.11.0 both download, verify their
  sha256 and find nothing), source (unit 59/59, integration 34/34, smoke 19/19),
  image (openwaf:ci 261 MB, compose smoke 43 passed / 0 failed), console (33
  assertions / 0 failed with playwright@1.63.0 and chromium-1243; the screenshot
  step published console-evidence.png 335998 B and console-evidence.phone.png
  264597 B).
- geo-freshness.yml: the job executed ("pin 2026-10 / newest 2026-10 / the pin
  is current", exit 0). The schedule has still never fired, and that is the part
  the file is for.
- README: the same numbers, plus the point the run bought — ubuntu-latest ships
  shellcheck 0.9.0-1, developers run 0.11.0, and the two disagree about one line
  of scripts/geo-db-bump.sh. Fixed in the previous commit.

The distinction each file keeps saying out loud: a local Actions-compatible
runner proves the YAML plays and the pinned tools resolve. It does not prove a
GitHub-hosted run is green, and the repository still has no remote.
2026-10-01 22:16:56 +02:00

60 lines
2.6 KiB
YAML

# The geo database the image bakes is pinned by a build ARG (Dockerfile
# ARG DBIP_VERSION=YYYY-MM) and dbip publishes a new lite database every month.
# A pin with nothing attached to it is a reminder someone has to keep: this one
# was moved by hand on 2026-10-01, and the month before that it sat at 2026-09.
#
# This job asks the vendor what the newest release is and goes red when the pin
# is behind, printing the command that moves it (scripts/geo-db-bump.sh). It is
# the only job here that talks to the internet on purpose.
#
# It deliberately does NOT open a pull request. A bot that cannot run the geo
# assertions bumping a data dependency unreviewed is a worse default than a red
# job a human reads; and the bump is not the whole change — an existing
# deployment keeps the old database until its named volume is removed, which is
# exactly the thing a green PR would hide.
#
# Honest status, same as every other file in this directory: it has never run on
# a GitHub-hosted runner, because the repository has no remote, and the schedule
# has never fired. The job itself has run — as a job, in a local
# Actions-compatible runner (act, catthehacker/ubuntu:act-latest): checkout, then
# "pin 2026-10 / newest 2026-10 / the pin is current", exit 0. So the step plays;
# what remains unproven is the trigger. One more thing worth knowing about GitHub
# rather than about this project: schedules are disabled on a repository with no
# push for 60 days, so a cron is a nudge with a failure mode, not a guarantee.
name: geo-freshness
on:
schedule:
# dbip has published the month's release on the 1st so far. Check on the 1st
# and again a week later, so a late publish or a single failed run is still
# caught inside the same month.
- cron: '17 3 1,8 * *'
workflow_dispatch:
push:
paths:
- Dockerfile
- scripts/geo-db-freshness.sh
- scripts/geo-db-bump.sh
- .github/workflows/geo-freshness.yml
permissions:
contents: read
jobs:
freshness:
name: the pinned geo database vs the vendor
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
# Three answers, not two: 0 the pin is current, 1 the vendor serves
# something newer, 2 could not tell (no network, or a pin the vendor has
# never served — which would make the image build fail on a 404). The exit
# code is passed through untouched, because a freshness check that reports
# success having checked nothing is the exact failure this job exists to
# prevent.
- name: pin vs vendor
run: ./scripts/geo-db-freshness.sh