mirror of
https://github.com/explosion/spaCy.git
synced 2025-03-22 02:44:15 +03:00
Try simpler approach [ci skip]
This commit is contained in:
parent
2898331494
commit
dd34a3a433
13
.github/workflows/autoblack.yml
vendored
13
.github/workflows/autoblack.yml
vendored
|
@ -18,24 +18,19 @@ jobs:
|
||||||
- run: pip install black
|
- run: pip install black
|
||||||
- name: Auto-format code if needed
|
- name: Auto-format code if needed
|
||||||
run: black spacy
|
run: black spacy
|
||||||
|
# We can't run black --check here because that returns a non-zero excit
|
||||||
|
# code and makes GitHub think the action failed
|
||||||
- name: Check for modified files
|
- name: Check for modified files
|
||||||
id: git-check
|
id: git-check
|
||||||
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi)
|
||||||
- name: Commit modified files
|
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
|
||||||
run: |
|
|
||||||
git config --global user.name 'explosion-bot'
|
|
||||||
git config --global user.email 'explosion-bot@users.noreply.github.com'
|
|
||||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
|
||||||
git status
|
|
||||||
git add -A
|
|
||||||
git commit -am "Auto-format code with black"
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
title: Auto-format code with black
|
title: Auto-format code with black
|
||||||
labels: meta
|
labels: meta
|
||||||
|
commit-message: Auto-format code with black
|
||||||
|
committer: GitHub <noreply@github.com>
|
||||||
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
|
||||||
body: _This PR is auto-generated._
|
body: _This PR is auto-generated._
|
||||||
branch: autoblack
|
branch: autoblack
|
||||||
|
|
Loading…
Reference in New Issue
Block a user