-
Notifications
You must be signed in to change notification settings - Fork 5.7k
74 lines (65 loc) · 2.04 KB
/
_Clone-linux.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Clone-linux
on:
workflow_call:
inputs:
PR_ID:
description: 'PR number'
required: true
type: string
COMMIT_ID:
description: 'commit number'
required: true
type: string
permissions: read-all
env:
PR_ID: ${{ inputs.PR_ID }}
COMMIT_ID: ${{ inputs.COMMIT_ID }}
jobs:
Clone:
# Don't run on forked repos.
if: github.repository_owner == 'PaddlePaddle'
runs-on:
group: HK-Clone
steps:
- name: Clone paddle
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
submodules: 'recursive'
fetch-depth: 1000
- name: Merge PR to test branch
run: |
git checkout -b test
git config --global user.name "PaddleCI"
git config --global user.email "paddle_ci@example.com"
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr
git merge --no-ff pr
git branch -d pr
- name: Download bos client
env:
bos_file: "/home/paddle/actions-runner/bos_upload.py"
run: |
if [ ! -f "${bos_file}" ]; then
# wget -q --no-proxy -O ${bos_file} https://paddle-docker-tar.cdn.bcebos.com/bos_upload.py --no-check-certificate
wget -q --no-proxy -O /home/paddle/actions-runner/bce_whl.tar.gz https://paddle-docker-tar.bj.bcebos.com/home/bce_whl.tar.gz --no-check-certificate
tar xf /home/bce_whl.tar.gz -C ${bos_file}
fi
- name: Push paddle-action.tar.gz to bos
env:
AK: 123
SK: 123
# AK: ${{ vars.AK }}
# SK: ${{ vars.SK }}
bos_file: "/home/paddle/actions-runner/bos_upload.py"
run: |
cd ..
tar -zcf Paddle.tar.gz Paddle
python -m pip install bce-python-sdk==0.8.74
python ${bos_file} Paddle.tar.gz paddle-github-action/PR/Paddle/${PR_ID}/${COMMIT_ID}
cd -
git checkout develop
git branch -D test
# - name: Clean environment
# if: always()
# run: |
# rm -rf ${{ github.workspace }}/*