Check Browser Versions #407
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Browser Versions | |
| permissions: | |
| contents: write | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Run at midnight UTC daily | |
| workflow_dispatch: # Allow manual triggers | |
| jobs: | |
| check-versions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install httpx jsonschema | |
| - name: Run Chrome version checker | |
| run: python scripts/checkers/chrome.py | |
| - name: Run Firefox version checker | |
| run: python scripts/checkers/firefox.py | |
| - name: Run Safari version checker | |
| run: python scripts/checkers/safari.py | |
| - name: Run Edge version checker | |
| run: python scripts/checkers/edge.py | |
| - name: Check for changes | |
| id: git-check | |
| run: | | |
| git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT | |
| - name: Commit changes if needed | |
| if: steps.git-check.outputs.changes == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add data/*.json | |
| git commit -m "Update browser versions" | |
| git push |