Source code synchronization #144
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: source code sync to bos | |
run-name: Source code synchronization | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
upload_bos: | |
if: ${{ !github.event.repository.fork }} | |
environment: CodeSync | |
runs-on: ubuntu-latest | |
steps: | |
- name: PaddleTest Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
tools | |
- name: Code Checkout | |
id: checkout | |
uses: XieYunshen/[email protected] | |
with: | |
repository: "PaddlePaddle/PaddleTest" | |
ref: "develop" | |
submodules: "false" | |
fetch_depth: 20 | |
path: "PaddleTest" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Upload Code | |
env: | |
AK: ${{ secrets.BOS_AK }} | |
SK: ${{ secrets.BOS_SK }} | |
run: | | |
tree -L 3 | |
path=PaddleTest | |
REPO_NAME=PaddleTest | |
file_name=$REPO_NAME.tar.gz | |
tar -zcf ${file_name} ${path} | |
python -m pip install bce-python-sdk==0.8.74 | |
python tools/bos_upload.py ${file_name} xly-devops/PaddleTest | |
echo "Bos link: https://xly-devops.bj.bcebos.com/PaddleTest/PaddleTest.tar.gz" |