Repository navigation
53 lines (46 loc) · 1.91 KB
/
Copy pathengineering-data-refresh.yml
File metadata and controls
53 lines (46 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Refresh Engineering Data
# Phase 3.2 engineering status is derived from the repository itself, and the
# freshness guard in tests/engineering-data.test.ts requires scan_time to be a
# real timestamp from the last day. Without a scheduled regeneration that guard
# rots into a red build a day after every manual refresh, so the data is
# re-derived daily from the repository (no invented values, no network calls).
on:
schedule:
- cron: '23 3 * * *'
workflow_dispatch:
permissions:
contents: write
# Serialise with the Lab sync. Both workflows write
# data/engineering-status.json and data/lab-apps.json, so two concurrent runs
# can produce a non-fast-forward push (the loser's scan is lost) or a stale
# overwrite. One shared group makes them queue instead of race.
# cancel-in-progress stays false: a queued scan must never kill a run that is
# mid-write, and this group never contains a deployment (those live in
# deploy.yml's own 'pages' group).
concurrency:
group: 'lab-sync'
cancel-in-progress: false
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # the generator reads real git history
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Regenerate engineering data from the repository
run: python3 scripts/generate-engineering-data.py
- name: Commit only when the derived data actually changed
run: |
set -euo pipefail
git config user.name "AppMintly Automation"
git config user.email "automation@appmintly.invalid"
git add data/engineering-status.json data/engineering-events.json data/lab-apps.json
if git diff --cached --quiet; then
echo "No derived changes; nothing to commit."
else
git commit -m "chore(engineering): refresh derived status data"
git push
fi