File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 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 :
You can’t perform that action at this time.
0 commit comments