Skip to content

operators-installer - add ability to specify tolerations for verify a… #47

operators-installer - add ability to specify tolerations for verify a…

operators-installer - add ability to specify tolerations for verify a… #47

name: Run pre-commit
on:
push:
paths-ignore:
- '.github/**'
pull_request:
paths-ignore:
- '.github/**'
# Declare default permissions as read only.
permissions: read-all
jobs:
pre-commit:
runs-on: ubuntu-latest
name: pre-commit
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: 3.x
- name: Remove rh-pre-commit hook (requires VPN)
uses: mikefarah/yq@c59fa8de59f1f5a16fdbfd1e2a6e97a1b42a64b9 # v4.45.2
with:
cmd: yq -i 'del( .repos[] | select(.rev == "rh-pre-commit-*"))' .pre-commit-config.yaml
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- name: Check if there are changes
id: changes
run: |
git checkout HEAD -- .pre-commit-config.yaml
echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
- name: Fail if changes found
if: steps.changes.outputs.changed >= 1
run: |
echo "Uncommitted changes exist. Failing."
echo
git status --porcelain
exit 1