-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (32 loc) · 1.17 KB
/
plugin-maimaidx-resources.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
name: Download nonebot-plugin-maimaidx Resources
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
download:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cache APT Packages
uses: awalsh128/[email protected]
with:
packages: "unzip curl"
- name: Download
run: |
curl -o /tmp/static.zip https://share.yuzuchan.moe/d/aria/Update.zip?sign=PFnIZpgyB_HptU-hHIQ-S_qhuuGTNDlmEEtmaEpmJlA=:0
curl -o /tmp/static2.zip https://share.yuzuchan.moe/d/aria/Resource.zip?sign=LOqwqDVm95dYnkEDYKX2E-VGj0xc_JxrsFnuR1BcvtI=:0
mkdir -p /tmp/maimaidx
unzip /tmp/static.zip -d /tmp/maimaidx/
unzip /tmp/static2.zip -d /tmp/maimaidx/
rm -rf ./bot/data/maimaidx || true
mkdir -p ./bot/data/maimaidx
cp -r /tmp/maimaidx/Resource/static/* ./bot/data/maimaidx
cp -r /tmp/maimaidx/Update/static/* ./bot/data/maimaidx
- name: Commit
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update nonebot-plugin-maimaidx Resources