Auto Pause Leishen #246
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Auto Pause Leishen | |
| on: | |
| schedule: | |
| # 自动暂停时间 (UTC时间00:00 = 北京时间8:00) | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: # 允许手动触发 | |
| jobs: | |
| pause: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24' | |
| - name: Cache Go modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install dependencies | |
| run: go mod tidy | |
| - name: Run Leishen Auto Pause | |
| env: | |
| TOKEN: ${{ secrets.TOKEN }} | |
| run: go run main.go |