Skip to content

Commit

Permalink
add readme job -fix3
Browse files Browse the repository at this point in the history
  • Loading branch information
t34-dev committed Aug 2, 2024
1 parent 994d084 commit 62b0033
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,17 @@ jobs:
- name: Update README.md badges
run: |
current_time=$(date +%s)
sed -i "s/\(https:\/\/img\.shields\.io\/.*&v=\)[0-9]*/\1$current_time/g" README.md
sed -i 's/\(v=\)[0-9]*/\1'"$current_time"'/g' README.md
- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "Update version to ${{ steps.get_version.outputs.VERSION }}"
git diff --quiet && git diff --staged --quiet || git commit -m "Update version to ${{ steps.get_version.outputs.VERSION }}"
- name: Push changes
run: |
git push origin HEAD:${{ github.event.repository.default_branch }}
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.event.repository.default_branch }}

0 comments on commit 62b0033

Please sign in to comment.