Update Trusted Tools #237
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 Trusted Tools | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# We'll run this weekly at 23.00 on Saturday. | |
- cron: '0 23 * * 6' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Perform linting | |
run: | | |
# Update the trusted tools. | |
make fix -j $(nproc) | |
make lint -j $(nproc) | |
make update_trusted -j $(nproc) | |
- name: Commit files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions[bot]" | |
git add *.lock | |
git commit -m "Updated trusted tools ($(date -I))" || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |