Bump akhilmhdh/contributors-readme-action from 2.3.8 to 2.3.10 #150
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: Auto Merge | |
on: | |
pull_request: | |
types: | |
- labeled | |
- unlabeled | |
- synchronize | |
- opened | |
- edited | |
- ready_for_review | |
- reopened | |
- unlocked | |
pull_request_review: | |
types: | |
- submitted | |
status: { } | |
# 定义作业 jobs,包括检查 PR 合规性和自动合并发布版本的 PR 到 master 分支两个步骤 | |
jobs: | |
# 检查 PR 合规性 | |
check: | |
runs-on: ubuntu-latest # 运行环境为最新版 ubuntu | |
# 步骤,包括代码 checkout、Node.js 环境设置、依赖安装、代码 lint、单元测试等操作 | |
steps: | |
- name: Checkout code # 步骤名称为:Checkout code | |
uses: actions/checkout@v3 # 使用 actions/checkout 动作 | |
- name: Setup Node.js environment # 步骤名称为:Setup Node.js environment | |
uses: actions/setup-node@v3 # 使用 actions/setup-node 动作安装 Node.js 环境 | |
with: | |
node-version: '14.x' | |
- name: Install dependencies # 步骤名称为:Install dependencies | |
run: |# 安装依赖 | |
npm install | |
npm i vitepress -D | |
# - name: Lint code # 步骤名称为:Lint code | |
# run: |# 执行 lint 命令 | |
# npm run lint | |
- name: Run unit tests # 步骤名称为:Run unit tests | |
run: |# 执行单元测试,如果没有测试用例返回 0 | |
npm run test || exit 0 | |
# 合并发布版本的 PR 到 master 分支 | |
auto-merge: | |
runs-on: ubuntu-latest # 运行环境为最新版 ubuntu | |
# 步骤,使用 pascalgn/automerge-action 动作实现自动合并发布版本的 PR 到 master 分支,并定义了环境变量 GITHUB_TOKEN 和 MERGE_FILTER_AUTHOR 条件过滤器。 | |
steps: | |
- name: Automerge # 步骤名称为:Automerge | |
uses: pascalgn/automerge-action@v0.15.6 # 使用 pascalgn/automerge-action 动作进行自动合并 PR 操作 | |
env: | |
GITHUB_TOKEN: '${{ secrets.RELEASE_TOKEN }}' # 设置 GitHub Token 密钥,从 secrets 中获取 | |
MERGE_LABELS: '' | |
MERGE_FILTER_AUTHOR: 'LingASDJ' # 只有作者是 mason369 的 PR 才会被自动合并。 |