Bug exclude group likes #40
Workflow file for this run
This file contains 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: Code Formatting | |
on: | |
pull_request: | |
branches: [rocket, develop] | |
jobs: | |
format-code: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Format code | |
run: black . | |
- name: Check for changes | |
id: check-changes | |
run: | | |
git status | |
git diff-index --quiet HEAD || echo "::set-output name=changes::yes" | |
echo "Code has been formatted" | |
- name: Commit changes | |
if: steps.check-changes.outputs.changes == 'yes' | |
run: | | |
git config --global user.email "damianstonedev@gmail.com" | |
git config --global user.name "damianstone" | |
git add . | |
git commit -m "Format from workflow" | |
git push origin HEAD:${{ github.event.pull_request.head.ref }} |