-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.26 KB
/
AllUp.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
45
46
47
48
49
50
name: AllUp
on:
pull_request:
types:
- opened
- synchronize
- reopened
schedule:
- cron: '26 1 * * 5'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
env:
TZ: Asia/Shanghai
jobs:
AllUp:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
- name: Setup Python
uses: actions/setup-python@v5.0.0
with:
python-version: '3.12'
cache: 'pip'
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Main
run: python main.py
env:
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_REF: ${{ github.ref }}
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
- uses: actions4git/setup-git@v1
- run: |
git checkout --orphan artifact/${{ github.ref }}
git add AllUp.wikitext
git commit -m "Update data"
git push --force origin artifact/${{ github.ref }}
- name: Preview on Pull Request
if: ${{ github.event_name == 'pull_request' }}
uses: thollander/actions-comment-pull-request@v2.4.2
with:
filePath: PR_preview.md
comment_tag: actions-wikitext-preview