build(deps): bump jinja2 from 2.11.3 to 3.1.3 in /requirements #241
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: format | |
# Run this workflow every time on push | |
on: push | |
jobs: | |
# Set the job key. The key is displayed as the job name | |
# when a job name is not provided | |
python-format: | |
# Name the Job | |
name: Run black python formatter | |
# Set the type of machine to run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Format with black | |
run: | | |
$CONDA/bin/conda install -c conda-forge black==20.8b1 click==8.0.4 | |
# stop the build if there are Python syntax errors or undefined names | |
$CONDA/bin/black minian | |
- name: Check for modified files | |
id: git-check | |
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) | |
- name: Push changes | |
if: steps.git-check.outputs.modified == 'true' | |
run: | | |
git config --global user.name 'DeniseCaiLab' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
git checkout `basename $GITHUB_REF` | |
git commit -am "Automated changes, black formatter" | |
git push origin HEAD:`basename $GITHUB_REF` |