update-types #78
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>' |