commands fix and client improvements #1
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
| name: format py files | |
| on: | |
| push: | |
| permissions: | |
| contents: write | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: setup python (needed) | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' # latest stable | |
| - name: install black formatter | |
| run: pip install black | |
| - name: format the files. | |
| run: | | |
| black . --include '\.py$' --exclude '/(.*\/)?[^/]+/' | |
| - name: fetch the changes | |
| run: | | |
| if [[ -n $(git status --porcelain) ]]; then | |
| echo "files_changed=true" >> $GITHUB_ENV | |
| fi | |
| - name: commit the changes | |
| if: env.files_changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit -am "auto-formatted py files" | |
| git push |