-
Notifications
You must be signed in to change notification settings - Fork 0
154 lines (136 loc) · 4.51 KB
/
ci.yml
File metadata and controls
154 lines (136 loc) · 4.51 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: CI
on:
schedule:
# Run at 16:00 UTC+8 every Tuesday (08:00 UTC)
- cron: '0 8 * * 2'
workflow_dispatch:
inputs:
skip_update:
description: 'Skip update step'
default: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build project
run: |
pnpm build
rm -rf node_modules
pnpm install --prod
- name: Run CI update command
if: inputs.skip_update == false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }}
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }}
MINIO_PREFIX: ${{ secrets.MINIO_PREFIX }}
run: |
node packages/cli/dist/index.js ci init
node packages/cli/dist/index.js ci update
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ixion-cli
include-hidden-files: true
path: |
node_modules/
packages/*/dist/
packages/*/node_modules/
packages/*/package.json
lib/SaintCoinach/SaintCoinach/Definitions/*.json
lib/EXDSchema/*.yml
.ixion-config.ci.json
package.json
datamining-cn:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ixion-cli
- uses: actions/checkout@v5
with:
repository: thewakingsands/ffxiv-datamining-cn
path: ffxiv-datamining-cn
ssh-key: ${{ secrets.SSH_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Run datamining command
id: export-csv
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }}
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }}
MINIO_PREFIX: ${{ secrets.MINIO_PREFIX }}
run: |
node packages/cli/dist/index.js ci init
node packages/cli/dist/index.js exd export-csv ffxiv-datamining-cn -s sdo --crlf
- name: Commit
uses: EndBug/add-and-commit@v9
with:
cwd: ffxiv-datamining-cn
default_author: github_actions
author_name: FFCAFE Automation
message: "ver ${{ steps.export-csv.outputs.version }}"
tag: 'ver-${{ steps.export-csv.outputs.version }} --force'
tag_push: '--force'
datamining-tc:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ixion-cli
- uses: actions/checkout@v5
with:
repository: thewakingsands/ffxiv-datamining-tc
path: ffxiv-datamining-tc
ssh-key: ${{ secrets.SSH_KEY_TC }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Run datamining command
id: export-csv
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MINIO_ENDPOINT: ${{ secrets.MINIO_ENDPOINT }}
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
MINIO_BUCKET_NAME: ${{ secrets.MINIO_BUCKET_NAME }}
MINIO_PREFIX: ${{ secrets.MINIO_PREFIX }}
run: |
node packages/cli/dist/index.js ci init
node packages/cli/dist/index.js exd export-csv ffxiv-datamining-tc -s userjoy --crlf
- name: Commit
uses: EndBug/add-and-commit@v9
with:
cwd: ffxiv-datamining-tc
default_author: github_actions
author_name: FFCAFE Automation
message: "ver ${{ steps.export-csv.outputs.version }}"
tag: 'ver-${{ steps.export-csv.outputs.version }} --force'
tag_push: '--force'