-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (49 loc) · 1.34 KB
/
Fetch.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
on:
workflow_call:
inputs:
which:
type: string
default: '[ { "text": "case", "emoji": "🦠" } ]'
workflow_dispatch:
inputs:
which:
type: string
default: '[ { "text": "case", "emoji": "🦠" } ]'
jobs:
fetch:
runs-on: ubuntu-latest
strategy:
matrix:
which: ${{ fromJson((github.event.inputs || inputs).which) }}
timeout-minutes: 2
steps:
- uses: actions/checkout@master
- uses: pnpm/action-setup@master
with:
version: 8
- uses: actions/setup-node@main
with:
node-version: 16
cache: 'pnpm'
- run: pnpm install --no-frozen-lockfile
- run: pnpm fetch:${{ matrix.which.text }}
- run: |
cd ./artifacts/
ls -la ./
tar --exclude='*.tar.gz' \
-zcvf ../fetch-${{ matrix.which.text }}.tar.gz \
./*
- uses: actions/upload-artifact@v2
with:
name: artifact-${{ matrix.which.text }}
path: fetch-${{ matrix.which.text }}.tar.gz
- run: |
mkdir -p data/
mv fetch-${{ matrix.which.text }}.tar.gz ./data/
cd data
tar -zxvf fetch-${{ matrix.which.text }}.tar.gz
- uses: corcc/publish@node
with:
TZ: 'Asia/Seoul'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TASK_NAME: ⬆️${{ matrix.which.emoji }}