-
Notifications
You must be signed in to change notification settings - Fork 56
44 lines (37 loc) · 1.31 KB
/
get_up.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
38
39
40
41
42
43
44
name: ci
on:
schedule:
- cron: "0 23 * * *"
workflow_dispatch:
jobs:
CreateImage:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
node-version: [18]
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install PNPM
uses: pnpm/action-setup@v2
with:
version: ^7.0
- name: Install Deps
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build
- name: Create Image
run: pnpm run start --cookie "${{ secrets.BING_COOKIE }}"
- name: Push New Pic
run: |
git config --local user.email "liruifeng1024@gmail.com"
git config --local user.name "${{ github.actor }}"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git add .
git commit -m "generated today pic" || echo "no need to commit "
git pull origin main --rebase
git push -f || echo "no file change"