-
Notifications
You must be signed in to change notification settings - Fork 262
43 lines (37 loc) · 986 Bytes
/
Copy pathmain.yml
File metadata and controls
43 lines (37 loc) · 986 Bytes
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
name: update
on:
schedule:
- cron: "0 0 * * SUN"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: "master"
- uses: actions/setup-go@v5
with:
go-version: "1.21.x"
- name: Create access token file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "$GITHUB_TOKEN" > access_token.txt
- name: Run update script
run: go run list2md.go
- name: Update the list
env:
GITHUB_USER: "mingrammer"
GITHUB_EMAIL: "mingrammer@gmail.com"
run: |
git config user.name "${GITHUB_USER}"
git config user.email "${GITHUB_EMAIL}"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "chore: auto update"
git push