name: Generate
on:
schedule:
- cron: "0 8 * * 1"
workflow_dispatch:
concurrency:
group: browser-data
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
jobs:
capture:
name: Capture stable browser headers
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Install Chrome
uses: browser-actions/setup-chrome@v2
id: chrome
with:
chrome-version: stable
install-dependencies: true
- name: Install Edge
uses: browser-actions/setup-edge@v1
id: edge
with:
edge-version: stable
- name: Install Firefox
uses: browser-actions/setup-firefox@v1
id: firefox
with:
firefox-version: latest
- name: Install virtual display
run: sudo apt-get update && sudo apt-get install -y xvfb
- name: Capture direct navigations through a local proxy
env:
CHROME: ${{ steps.chrome.outputs.chrome-path }}
EDGE: ${{ steps.edge.outputs.edge-path }}
FIREFOX: ${{ steps.firefox.outputs.firefox-path }}
run: |
xvfb-run -a python3 tools/capture.py chrome --binary "$CHROME"
xvfb-run -a python3 tools/capture.py edge --binary "$EDGE"
xvfb-run -a python3 tools/capture.py firefox --binary "$FIREFOX"
- name: Generate offline data and verify profiles
run: |
python3 tools/update.py
cargo test -p uagent --all-features
cargo clippy -p uagent --all-features --all-targets -- -D warnings
- name: Propose capture updates
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.BROWSER_DATA_TOKEN || github.token }}
branch: bot/uagent-browser-data
title: "chore(uagent): refresh browser capture data"
commit-message: "chore(uagent): refresh browser capture data"
add-paths: |
tests/captures/*.json
src/generated.rs
body: |
Refresh stable Chrome, Edge and Firefox navigation headers captured
through the local proxy, and regenerate the bundled offline data.
Profile tests and Clippy passed. Review
header changes and release the data in a uagent patch release.
Safari captures are maintained separately on macOS.