Skip to content

Monitor for spec changes #140

Monitor for spec changes

Monitor for spec changes #140

Workflow file for this run

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