Skip to content

Commit f988d3f

Browse files
committed
Attempt autoblack - fsck up smile.py
1 parent 71b9aab commit f988d3f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/verify.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ jobs:
7070
steps:
7171
- name: Check out committed code
7272
uses: actions/checkout@v2
73+
with:
74+
persist-credentials: false
7375
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
7476
id: python
7577
uses: actions/setup-python@v2
@@ -90,21 +92,25 @@ jobs:
9092
run: |
9193
echo "Failed to restore Python ${{ env.DEFAULT_PYTHON }} virtual environment from cache"
9294
exit 1
93-
- name: Install Black
94-
run: pip install black
9595
- name: Run black --check .
96-
run: black --check .
96+
run: |
97+
. venv/bin/activate
98+
black --check .
9799
- name: If needed, commit black changes to the pull request
98100
if: failure()
99101
run: |
100-
pip install black
102+
. venv/bin/activate
101103
black .
102104
git config --global user.name 'autoblack'
103105
git config --global user.email '[email protected]'
104106
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
105107
git checkout $GITHUB_HEAD_REF
106108
git commit -am "fixup: Format Python code with Black"
107-
git push
109+
- name: Push changes
110+
uses: ad-m/github-push-action@master
111+
if: failure()
112+
with:
113+
github_token: ${{ secrets.PAT_CT}}
108114

109115

110116
commitcheck:

0 commit comments

Comments
 (0)