Skip to content

CI

CI #27

Workflow file for this run

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
- 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:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ixion-cli
- name: Fetch library
run: git clone --depth 1 https://github.com/thewakingsands/ffxiv-datamining-cn.git ffxiv-datamining-cn
- 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: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
path: ffxiv-datamining-cn
commit-message: "ver ${{ steps.export-csv.outputs.version }}"
branch: ci/ixion-${{ steps.export-csv.outputs.version }}
base: master
title: "ci: ver ${{ steps.export-csv.outputs.version }}"
body: |
This PR is automatically generated by [ixion](https://github.com/thewakingsands/ixion)