Update configs #11800
This file contains 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 configs | |
on: | |
schedule: | |
- cron: "*/10 * * * *" | |
workflow_dispatch: | |
jobs: | |
fetch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Clone repository" | |
uses: actions/checkout@v4 | |
- name: "Install uv" | |
uses: astral-sh/setup-uv@v3 | |
with: | |
version: "0.4.27" | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: "Set up Python" | |
run: uv python install | |
- name: "Install the project" | |
run: uv sync --no-dev | |
- name: "Update configs" | |
run: uv run --no-dev -m src.main | |
- name: "Sort configs" | |
run: uv run --no-dev -m src.sort | |
- name: "Commit and push changes" | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add --all | |
git diff-index --quiet HEAD || git commit -m "chore: update configs ($(date '+%Y-%m-%d %H:%M:%S'))" | |
git push |