Skip to content

Commit 9641dff

Browse files
authored
使用安装低版本git的镜像执行clone及上传 (#2918)
1 parent 8b5e54d commit 9641dff

File tree

1 file changed

+13
-32
lines changed

1 file changed

+13
-32
lines changed

.github/workflows/source_sync.yml

+13-32
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,21 @@ on:
44
workflow_dispatch:
55
jobs:
66
upload_bos:
7+
if: ${{ !github.event.repository.fork }}
78
runs-on: ubuntu-latest
89
steps:
9-
- name: Git Version
10-
run: git --version
11-
- name: Install dependencies
12-
run: |
13-
sudo apt-get update
14-
sudo apt-get install -y build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
15-
- name: Download and install Git 2.34
16-
run: |
17-
wget https://github.com/git/git/archive/refs/tags/v2.34.0.zip
18-
unzip v2.34.0.zip
19-
cd git-2.34.0
20-
make prefix=/usr/local all
21-
sudo make prefix=/usr/local install
22-
- name: Check Git version
23-
run: git --version
24-
- uses: actions/checkout@v4
25-
with:
26-
fetch-depth: 20
27-
- uses: conda-incubator/setup-miniconda@v3
28-
with:
29-
auto-activate-base: true
30-
activate-environment: ""
31-
- name: upload-source-code
10+
- name: code-clone-upload
3211
env:
3312
AK: ${{ secrets.BOS_AK }}
3413
SK: ${{ secrets.BOS_SK }}
35-
run: |
36-
ls -l
37-
pwd
38-
cd ../
39-
tar -zcf PaddleTest_workflow.tar.gz ./PaddleTest
40-
python -m pip install bce-python-sdk==0.8.74
41-
BRANCH_NAME=${GITHUB_REF#refs/heads/}
42-
echo "Branch Name: $BRANCH_NAME"
43-
python ./PaddleTest/tools/bos_upload.py PaddleTest_workflow.tar.gz xly-devops/PaddleTest
14+
uses: docker://xieyunshen2020/paddleqa:code-clone-git2.34
15+
with:
16+
entrypoint: /bin/sh
17+
args: |
18+
-c "
19+
git clone https://github.com/PaddlePaddle/PaddleTest.git --depth=10 .
20+
ls -l
21+
pwd
22+
tar -czf PaddleTest_workflow.tar.gz *
23+
python3 ./tools/bos_upload.py PaddleTest_workflow.tar.gz xly-devops/PaddleTest
24+
"

0 commit comments

Comments
 (0)