-
Notifications
You must be signed in to change notification settings - Fork 117
36 lines (34 loc) · 1.09 KB
/
single_file_sync_auto.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
name: tools file sync to bos
run-name: Tools file synchronization
on:
push:
paths:
- 'tools/bos_upload.py'
- 'tools/linux_env_info.sh'
workflow_dispatch:
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
- 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
echo "Repository: ${{ github.repository }}"
echo "Branch: ${{ github.ref }}"
python -m pip install bce-python-sdk==0.8.74
branch=$(echo '${{ github.ref }}' | sed 's#refs/heads/##')
python tools/bos_upload.py tools/bos_upload.py paddle-qa/CodeSync/${branch}/${{ github.repository }}
python tools/bos_upload.py tools/linux_env_info.sh paddle-qa/CodeSync/${branch}/${{ github.repository }}