Skip to content

v1 loop task bot

v1 loop task bot #154

Workflow file for this run

# 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