deploy key for pushing #68
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: formatting | |
on: | |
push: | |
branches: | |
- release/v** | |
- main | |
jobs: | |
formatting: | |
name: Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout repository | |
with: | |
ssh-key: ${{secrets.DEPLOY_KEY}} | |
- name: Configure Git | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "Github Action" | |
git config --local core.autocrlf true | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.cfg') }} | |
- name: Install REL and dependencies | |
run: | | |
pip install -U pip | |
pip install -e .[develop] | |
- name: Code formatting | |
run: | | |
isort . | |
black . | |
- name: Commit formatting changes | |
run: | | |
git add -u | |
git commit -m "[skip ci] Code formatting" -a || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ github.ref }} | |
ssh-key: ${{secrets.DEPLOY_KEY}} |