-
Notifications
You must be signed in to change notification settings - Fork 3
31 lines (29 loc) · 1.05 KB
/
spec.yml
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
name: Monitor for spec changes
on:
schedule:
- cron: '42 6 */2 * *'
jobs:
spec:
name: Verify spec
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download spec
run: |
curl https://stream.wikimedia.org/?spec > /tmp/spec.json
- name: Upload spec
uses: actions/upload-artifact@v4
with:
name: spec
path: /tmp/spec.json
- name: Verify spec
run: |
EXPECT="$( cat spec.json | sha1sum )"
ACTUAL="$( cat /tmp/spec.json | sha1sum )"
echo "Expected: $EXPECT"
echo "Actual: $ACTUAL"
if [[ "$EXPECT" != "$ACTUAL" ]]; then
echo "Spec has changed. Please update the code."
echo "Update with \`curl https://stream.wikimedia.org/?spec > spec.json\`"
exit 1
fi