Skip to content

update-types

update-types #78

Workflow file for this run

name: Update Type Definition
on:
repository_dispatch:
types: [update-types]
workflow_dispatch:
jobs:
update-types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 1
- uses: ./.github/actions/setup-js-env
- name: Update OpenAPI Definition
run: pnpm client update-openapi
env:
OPENAPI_URL: 'https://github.com/bangumi/dev-docs/raw/master/api.yaml'
- name: Build Type Definition
run: pnpm client build
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
title: 'chore(types): update private API type definition'
# 使用 token 创建 PR 才能触发默认的 ci
push-to-fork: bangumi-bot/frontend
branch: 'update-types'
token: ${{ secrets.PAT }}
author: 'bangumi-bot <[email protected]>'
committer: 'bangumi-bot <[email protected]>'