File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,20 @@ jobs:
28
28
- env :
29
29
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
30
30
run : |
31
- git checkout -b pre-commit-autoupdate
31
+ git fetch --all
32
+ git checkout -B pre-commit-autoupdate
32
33
pip install pre-commit
33
34
pre-commit --version
34
35
pre-commit autoupdate
35
36
git diff --exit-code && exit 0
36
37
git add -A
37
38
git config user.name 'github-actions[bot]'
38
39
git config user.email 'github-actions[bot]@users.noreply.github.com'
39
- git commit -m '[CI/CD] pre-commit autoupdate'
40
- git push -f origin pre-commit-autoupdate
41
- gh pr create -B dev -H pre-commit-autoupdate -f -l 'CI/CD'
40
+ if git ls-remote -h --exit-code origin pre-commit-autoupdate
41
+ then
42
+ git commit --amend --no-edit
43
+ git push -f origin pre-commit-autoupdate
44
+ else
45
+ git commit -m '[CI/CD] pre-commit autoupdate'
46
+ git push origin pre-commit-autoupdate
47
+ gh pr create -B dev -H pre-commit-autoupdate -f -l 'CI/CD'
You can’t perform that action at this time.
0 commit comments