Skip to content

build(deps): bump step-security/harden-runner from 2.9.1 to 2.10.1 #282

build(deps): bump step-security/harden-runner from 2.9.1 to 2.10.1

build(deps): bump step-security/harden-runner from 2.9.1 to 2.10.1 #282

Workflow file for this run

name: Linting
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
linting:
name: Linting
runs-on: ubuntu-22.04
permissions:
contents: write # for stefanzweifel/git-auto-commit-action to create a PR
strategy:
fail-fast: false
matrix:
tool: ['isort', 'black', 'pyupgrade', 'flake8', 'bandit', 'gitlint']
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- uses: actions/checkout@v4 # v3.5.3
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.1.0
with:
python-version: '3.x'
cache: 'pip'
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade pre-commit
pre-commit install
- name: Run ${{ matrix.tool }} using pre-commit
if: ${{ matrix.tool != 'gitlint' }}
run: |
pre-commit run ${{ matrix.tool }} --all-files
- name: Run gitlint
env:
TITLE: ${{ github.event.pull_request.title }}
if: ${{ github.event_name == 'pull_request' && matrix.tool == 'gitlint' }}
run: |
python -m pip install --upgrade gitlint
echo "$TITLE" | gitlint
- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842