build: 使用不同的action处理push及pr

This commit is contained in:
BugKing 2022-04-25 14:17:05 +08:00 committed by 刘瑞斌
parent ef33aa45bf
commit e2709ece6f
2 changed files with 25 additions and 4 deletions

17
.github/workflows/add-labels-for-pr.yml vendored Normal file
View File

@ -0,0 +1,17 @@
on: pull_request
name: MeterSphere 通用 PR 处理
jobs:
generic_handler:
name: 为 PR 添加标签
runs-on: ubuntu-latest
steps:
- name: Add labels
uses: jumpserver/action-generic-handler@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: ${{ github.base_ref }}

View File

@ -1,13 +1,17 @@
on: [push, pull_request, release]
on:
push:
branches:
- 'pr@**'
- 'repr@**'
name: MeterSphere pull request handler
name: 针对特定分支名自动创建 PR
jobs:
generic_handler:
name: Generic handler for MeterSphere Repos
name: 自动创建 PR
runs-on: ubuntu-latest
steps:
- name: Add labels
- name: Create pull request
uses: jumpserver/action-generic-handler@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}