Skip to content

Merge branch 'dev_0.22' of github.com:C2SM/spack-c2sm into dev_0.22 #2086

Merge branch 'dev_0.22' of github.com:C2SM/spack-c2sm into dev_0.22

Merge branch 'dev_0.22' of github.com:C2SM/spack-c2sm into dev_0.22 #2086

Workflow file for this run

name: Formatting python code
on:
push:
branches-ignore:
# We don't want code modified after merge in master
- master
paths:
# Run action if any python-file is pushed
- '**.py'
jobs:
autoyapf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
ref: ${{ github.head_ref }}
- name: Auto-formatting
id: Auto-formatting
uses: mritunjaysharma394/autoyapf@v2
with:
args: --style pep8 --recursive --in-place .
- 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 'github-actions'
git config --global user.email '[email protected]'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git commit -am "GitHub Action: Apply Pep8-formatting"
git push