Skip to content

Update jinja templates #295

Update jinja templates

Update jinja templates #295

---
name: Update python linting dependencies in-sync with pre-commit
on:
pull_request:
branches: [main]
workflow_call:
inputs:
pre-commit-hook-skip-list:
description: A comma-separated list of pre-commit hooks to skip during this
job.
required: false
type: string
jobs:
update-python-and-pre-commit-deps:
name: Update python linters and pre-commit dependencies
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && contains(github.head_ref, '/pip/') }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ secrets.TEK_OPENSOURCE_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: x # any version
check-latest: true
- name: Install workflow dependencies
run: pip install -r scripts/requirements.txt
- uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.TEK_OPENSOURCE_GPG_SIGNING_KEY_PRIVATE }}
passphrase: ${{ secrets.TEK_OPENSOURCE_GPG_SIGNING_KEY_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Run updater script
run: python scripts/update_development_dependencies.py --no-install
- name: Run pre-commit
continue-on-error: true
env:
SKIP: ${{ inputs.pre-commit-hook-skip-list || 'pylint,pyright,pyright-verifytypes,pyroma,poetry-audit' }}
run: python -m pre_commit run --all
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'ci: Update python linters and pre-commit dependencies.'
commit_user_name: ${{ vars.TEK_OPENSOURCE_NAME }}
commit_user_email: ${{ vars.TEK_OPENSOURCE_EMAIL }}
commit_author: ${{ vars.TEK_OPENSOURCE_NAME }} <${{ vars.TEK_OPENSOURCE_EMAIL }}>