Skip to content

Commit d2d3d58

Browse files
ci(vendor): add vendor-drift workflow (step 3 of ingestion plan)
Adds `.github/workflows/vendor-drift.yml` which regenerates the vendored MEOS-API artefacts (`make vendor-meos-api`) on every PR touching `vendor/meos-api/`, the Makefile, or the workflow itself, plus on push to master and on a daily 06:00 UTC cron. On drift it fails with an actionable message: ::error::vendor/meos-api/ is stale. Run `make vendor-meos-api` locally and open a refresh PR. This is step 3 of `docs/MEOS_API_INGESTION_PLAN.md` ("CI gate that regenerates the vendored artefacts and fails the PR if they drift"). Stacks on PR #4 (vendoring + Makefile).
1 parent 4d5098f commit d2d3d58

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/vendor-drift.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Vendor drift (MEOS-API)
2+
3+
# Re-runs the `make vendor-meos-api` target against the live MEOS-API master
4+
# and fails if the vendored artefacts under `vendor/meos-api/` are out of date.
5+
#
6+
# Surfaces upstream changes as actionable PR diffs instead of letting them
7+
# silently rot. The CI failure message tells the maintainer to run
8+
#
9+
# make vendor-meos-api
10+
#
11+
# locally and submit a refresh PR.
12+
#
13+
# Step 3 of `docs/MEOS_API_INGESTION_PLAN.md`.
14+
15+
on:
16+
pull_request:
17+
paths:
18+
- 'vendor/meos-api/**'
19+
- 'Makefile'
20+
- '.github/workflows/vendor-drift.yml'
21+
push:
22+
branches: [master]
23+
schedule:
24+
# Daily 06:00 UTC — pings the maintainer if MEOS-API master moves and the
25+
# vendored copy goes stale, even without a MobilityAPI PR open.
26+
- cron: '0 6 * * *'
27+
workflow_dispatch:
28+
29+
jobs:
30+
vendor-drift:
31+
name: Refresh & diff vendored artefacts
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Refresh vendored MEOS-API artefacts from master
37+
run: make vendor-meos-api
38+
39+
- name: Detect drift
40+
id: drift
41+
run: |
42+
if git diff --exit-code -- vendor/meos-api/; then
43+
echo "drift=false" >> "$GITHUB_OUTPUT"
44+
echo "::notice::vendor/meos-api/ is up to date with MEOS-API master."
45+
else
46+
echo "drift=true" >> "$GITHUB_OUTPUT"
47+
echo "::error::vendor/meos-api/ is stale. Run \`make vendor-meos-api\` locally and open a refresh PR."
48+
git diff --stat -- vendor/meos-api/
49+
exit 1
50+
fi

0 commit comments

Comments
 (0)