-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (31 loc) · 1 KB
/
moeCounter.yml
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
name: Update MoeCounter
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
jobs:
update-counter:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5.0.2
- name: Get binary count
id: get-listc
run: |
LISTC=$(go run *.go list | wc -l)
echo "LISTC=$LISTC" >> $GITHUB_ENV
- name: Download MoeCounter image
run: |
wget -O ./misc/assets/counter.svg \
"https://api.sefinek.net/api/v2/moecounter?number=${{ env.LISTC }}&length=5&theme=gelbooru&pixelated=true"
- name: Commit and push updated counter image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add ./misc/assets/counter.svg
git commit -m "[WEEKLY] Update MoeCounter image"
git push