Updated Actions Versions

Newer checkout and Python version.
pull/1307/head
Simon 4 years ago committed by GitHub
parent e678da56ad
commit 8b6f3fa066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,22 +11,31 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
- name: Set up Python 3.7 - name: Set up Python 3.10
uses: actions/setup-python@v1 uses: actions/setup-python@v4
with: with:
python-version: 3.9 python-version: 3.10
- name: Install Black - name: Install Black
run: pip install black run: pip install black
- name: Run black --check . - name: Run black --check .
run: black --check . run: black --check .
- name: If needed, commit black changes to the pull request - name: Commit files
if: failure() id: commit
run: | run: |
black . --line-length 101 git config --local user.email "action@github.com"
git config --global user.name 'autoblack' git config --local user.name "github-actions"
git config --global user.email 'jasoncameron.all@gmail.com' git add --all
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY if [-z "$(git status --porcelain)"]; then
git checkout $GITHUB_HEAD_REF echo "::set-output name=push::false"
git commit -am "fixup: Format Python code with Black" else
git push git commit -m "Added translation" -a
echo "::set-output name=push::true"
fi
shell: bash
- name: Push changes
if: steps.commit.outputs.push == 'true'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main

Loading…
Cancel
Save