-
Notifications
You must be signed in to change notification settings - Fork 6k
48 lines (42 loc) · 1.27 KB
/
Approval.yml
File metadata and controls
48 lines (42 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Approval
on:
pull_request:
types: [opened, synchronize]
env:
BRANCH: ${{ github.base_ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_ID: ${{ github.event.pull_request.number }}
COMMIT_ID: ${{ github.event.pull_request.head.sha }}
token: ${{ vars.ACTION_GITHUB_TOKEN }}
jobs:
check-bypass:
name: Check bypass
uses: ./.github/workflows/check-bypass.yml
with:
workflow-name: 'approval'
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
check-approvers:
name: Check approval
needs: check-bypass
if: ${{ needs.check-bypass.outputs.can-skip != 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 200
- name: Update paddle
run: |
git switch -c test
git remote add upstream https://github.com/PaddlePaddle/Paddle.git
git fetch upstream $BRANCH
git checkout $BRANCH
git config --global user.name "PaddleCI"
git config --global user.email "paddle_ci@example.com"
git merge test
- name: Display Required Approvers
run: |
bash ci/check_approval.sh