Skip to content

Commit 454404c

Browse files
committed
ci: Only push if README was actually changed
1 parent 0da9f56 commit 454404c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/update_readme.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ jobs:
1414
repository: Griefed/ServerPackCreator
1515
ref: main
1616

17+
- uses: release-kit/hash-files@v1
18+
id: get-current-hash
19+
with:
20+
patterns: |
21+
README.md
22+
- name: Current README hash
23+
run: echo ${{ steps.get-current-hash.outputs.hash }}
24+
1725
- name: Add GitHub Sponsors to Readme
1826
uses: JamesIves/github-sponsors-readme-action@v1
1927
with:
@@ -31,7 +39,16 @@ jobs:
3139
style: 'base'
3240
avatar-width: '70'
3341

42+
- uses: release-kit/hash-files@v1
43+
id: get-new-hash
44+
with:
45+
patterns: |
46+
README.md
47+
- name: New README hash
48+
run: echo ${{ steps.get-new-hash.outputs.hash }}
49+
3450
- name: Push
51+
if: "${{ steps.get-current-hash.outputs.hash }}" != "${{ steps.get-new-hash.outputs.hash }}"
3552
run: |
3653
apt-get update && apt-get install git -y && \
3754
git config user.name ${{ secrets.GIT_USER }} && \

0 commit comments

Comments
 (0)