-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.49 KB
/
ci.yaml
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: v1 loop task bot
on:
push:
schedule:
- cron: '0 23 * * *'
jobs:
bot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '^1.22.4'
- name: Download v1 bot script
run: |
wget https://github.com/waifu-project/movie/raw/dev/script/ckbot/go.mod
wget https://github.com/waifu-project/movie/raw/dev/script/ckbot/go.sum
wget https://github.com/waifu-project/movie/raw/dev/script/ckbot/main.go
wget https://github.com/waifu-project/movie/raw/dev/script/ckbot/template.html
- name: Start run v1 bot script
run: go run main.go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OUTPUT: yoyo.json
OUT_HTML: index.html
- name: Auto commit and force push
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add yoyo.json
git add index.html
git commit --amend --no-edit --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true