Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/update-fls.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Update FLS
on:
schedule:
- cron: "05 0 * * *"
workflow_dispatch:
jobs:
update-fls:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Update FLS
run: |
./test_update_fls.sh
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Update FLS (automated PR)
title: Update FLS (automated PR)
body: Update FLS (automated PR)
base: main
labels: automated-pr
branch: update-fls
delete-branch: true
2 changes: 1 addition & 1 deletion builder/build_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build_docs(

dest = root / "build"

args = ["-b", builder, "-d", dest / "doctrees"]
args = ["-b", builder, "-d", dest / "doctrees", "-wtest.txt"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs moving out into a flagged parameter so it doesn't happen with every build.


if debug:
# Disable parallel builds and show exceptions in debug mode.
Expand Down
27 changes: 27 additions & 0 deletions test_update_fls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

./make.py
if [ $? -eq "0" ];then
echo "FLS is up to date"
exit 0 # No error, no update required
else
grep -q "ERROR: The FLS specification has changed since the lock file was created:" test.txt
OUTOFDATE=$?
grep -q "Found differences between live FLS data and lock file affecting 0 guidelines" test.txt
ZEROAFFECTED=$?

if [ $OUTOFDATE -eq "0" ]; then
if [ $ZEROAFFECTED -eq "0" ]; then
./make.py --update-spec-lock-file
rm test.txt
exit 1 # Can be updated automatically
else
./make.py --update-spec-lock-file
rm test.txt
exit 2 # Guidelines need human review
fi
fi
fi

rm test.txt
exit 3 # Other build error not related to FLS
Loading