File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,17 @@ jobs:
23
23
- name : Update README.md badges
24
24
run : |
25
25
current_time=$(date +%s)
26
- sed -i " s/\(https:\/\/img\.shields\.io\/.*& v=\)[0-9]*/\1$current_time/g" README.md
26
+ sed -i ' s/\(v=\)[0-9]*/\1'" $current_time"'/g' README.md
27
27
28
28
- name : Commit changes
29
29
run : |
30
30
git config --local user.email "[email protected] "
31
31
git config --local user.name "GitHub Action"
32
32
git add README.md
33
- git commit -m "Update version to ${{ steps.get_version.outputs.VERSION }}"
33
+ git diff --quiet && git diff --staged --quiet || git commit -m "Update version to ${{ steps.get_version.outputs.VERSION }}"
34
34
35
35
- name : Push changes
36
- run : |
37
- git push origin HEAD:${{ github.event.repository.default_branch }}
36
+ uses : ad-m/github-push-action@master
37
+ with :
38
+ github_token : ${{ secrets.GITHUB_TOKEN }}
39
+ branch : ${{ github.event.repository.default_branch }}
You can’t perform that action at this time.
0 commit comments