Paddle kits repos sync Runs on repository_dispatch #24
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: Paddle kits repos sync via repository_dispatch | |
run-name: Paddle kits repos sync Runs on ${{ github.event_name }} | |
on: | |
repository_dispatch: | |
types: [sync-event] | |
jobs: | |
paddleqa-checkout: | |
runs-on: ubuntu-latest | |
name: Repo Checkout and Upload | |
steps: | |
- name: PaddleTest Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
tools | |
- name: Code Checkout | |
id: checkout | |
uses: XieYunshen/PaddleQACheckout@v1.0.0 | |
with: | |
repository: ${{ github.event.client_payload.repository }} | |
ref: ${{ github.event.client_payload.ref }} | |
submodules: ${{ github.event.client_payload.submodules }} | |
fetch_depth: ${{ github.event.client_payload.fetch_depth }} | |
path: ${{ github.event.client_payload.path }} | |
- 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 | |
REPO_NAME=${{ github.event.client_payload.repository }} | |
REPO_NAME=${REPO_NAME##*/} | |
file_name=$REPO_NAME.tar | |
tar -cf $REPO_NAME.tar ${{ github.event.client_payload.path }} | |
python -m pip install bce-python-sdk==0.8.74 | |
python tools/bos_upload.py ${file_name} paddle-qa/CodeSync/${{ github.event.client_payload.ref }}/ | |
echo "Bos link: https://paddle-qa.bj.bcebos.com/CodeSync/${{ github.event.client_payload.ref }}/$file_name" |