Update lists #19999
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: Update lists | |
| on: | |
| schedule: | |
| - cron: '15,45 * * * *' # Run every hour at 15 and 45 minutes past the hour | |
| workflow_dispatch: | |
| jobs: | |
| update-lists: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3. | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: 3.13 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@5a7eac68fb9809dea845d802897dc5c723910fa3 # v7.1.3 | |
| - run: uv sync --frozen | |
| - name: Generate list files | |
| env: | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| run: | | |
| mkdir newlists | |
| uv run python update-lists.py --output-dir newlists | |
| - name: Commit files | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote set-branches origin lists | |
| git fetch --depth 1 origin lists | |
| git switch lists | |
| cp -rf newlists/* lists/ && rm -rf newlists | |
| git add lists | |
| git commit -m "Automatically updated lists: $(date)" -a || true | |
| - name: Push changes | |
| run: | | |
| git remote add github "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" | |
| git push -u github lists |