Fix for duplicated message printing #445
Workflow file for this run
This file contains hidden or 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
| # workflow to validate code formatting using pre-commit hooks | |
| name: Code Quality Check | |
| permissions: | |
| contents: read | |
| on: | |
| - pull_request | |
| - workflow_dispatch | |
| jobs: | |
| pre-commit: | |
| runs-on: [ self-hosted ] | |
| container: python:3.9 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # Fetch all history for pre-commit to work | |
| - name: Configure git for container | |
| run: | | |
| git config --global --add safe.directory /__w/node-scraper/node-scraper | |
| git config --global user.email "[email protected]" | |
| git config --global user.name "CI Bot" | |
| - name: setup environment and run pre-commit hooks | |
| shell: bash | |
| run: | | |
| source ./dev-setup.sh | |
| pre-commit run --all-files --show-diff-on-failure --color=always | |
| - name: Print message on failure | |
| if: failure() | |
| run: | | |
| echo "### :x: Pre-commit hooks failed. Please check logs for changes needed" >> $GITHUB_STEP_SUMMARY |