name: Scrape Errors on: workflow_dispatch: schedule: - cron: '0 0 * * *' # Run daily at midnight UTC jobs: scrape_and_commit: name: Scrape and Update Error Lists runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 1 - name: Install uv uses: astral-sh/setup-uv@v5 with: python-version: "3.10" - name: Install Python dependencies and run scripts run: | set -e echo "-------------------- Running scrape script --------------------" uv run --with requests compiler/errors/sort.py scrape echo "-------------------- Running sort script --------------------" uv run --with requests compiler/errors/sort.py sort - name: Check for changes and commit run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "GitHub Actions Bot" if ! git diff --quiet; then echo "Changes detected in error files." git add . git commit -m "Automated update of unknown_errors" echo "Committing and pushing changes..." git push origin main else echo "No changes detected in error files. Skipping commit and push." fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}