-
-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (54 loc) · 1.92 KB
/
Copy pathupdate_readme.yml
File metadata and controls
61 lines (54 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Update README with blog posts and sponsors
on:
workflow_dispatch:
jobs:
blog:
runs-on: ubuntu-latest
name: "Fetch and Generate Blog Posts"
steps:
- name: Checkout
uses: actions/checkout@v6
with:
repository: Griefed/ServerPackCreator
ref: main
- uses: release-kit/hash-files@v1
id: get-current-hash
with:
patterns: |
README.md
- name: Current README hash
run: echo ${{ steps.get-current-hash.outputs.hash }}
- name: Add GitHub Sponsors to Readme
uses: JamesIves/github-sponsors-readme-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
active-only: false
file: 'README.md'
- uses: actions-cool/contributor-helper@v1.2.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
update-files: 'README.md'
update-places: '<!-- contributors -->/<!-- contributors end -->'
repo: 'Griefed/ServerPackCreator'
show-total: false
style: 'base'
avatar-width: '70'
- uses: release-kit/hash-files@v1
id: get-new-hash
with:
patterns: |
README.md
- name: New README hash
run: echo ${{ steps.get-new-hash.outputs.hash }}
- name: Push
if: ${{ steps.get-current-hash.outputs.hash != steps.get-new-hash.outputs.hash }}
run: |
apt-get update && apt-get install git -y && \
git config user.name ${{ secrets.GIT_USER }} && \
git config user.email ${{ secrets.GIT_MAIL }} && \
pwd && ls -ahl && \
git add README.md && \
wait && \
git status && \
git commit -m 'chore: Update sponsors and contributors' && \
git push "https://${{ secrets.GIT_USER }}:${{ secrets.GITLAB_TOKEN }}@${{ secrets.CI_SERVER_HOST }}/${{ secrets.GIT_USER }}/${{ secrets.CI_PROJECT_TITLE }}.git"