Skip to content

Commit 3b11528

Browse files
authored
ci: sync whl file to Gitfarm (#16)
sync whl file to Gitfarm
1 parent bb1f2e9 commit 3b11528

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/sync-package.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,31 @@ jobs:
5454
--cli-binary-format raw-in-base64-out \
5555
output.txt
5656
- name: Check for error in lambda invoke
57-
id: check_text_tar_gz
5857
run: |
5958
if grep -q "Error" output.txt; then
6059
cat output.txt
6160
exit 1
62-
fi
61+
fi
62+
- name: Get whl name
63+
id: whl_name
64+
run: |
65+
WHL_NAME=$(ls *.whl)
66+
echo "whl_name=$WHL_NAME" >> $GITHUB_OUTPUT
67+
working-directory: dist
68+
- name: Copy whl build file to s3
69+
run: |
70+
aws s3 cp ./dist/${{steps.whl_name.outputs.whl_name}} \
71+
s3://${{ secrets.S3_BUCKET_NAME }}/
72+
- name: commit whl to Gitfarm
73+
run: |
74+
aws lambda invoke \
75+
--function-name ${{ secrets.SYNC_LAMBDA_ARN }} \
76+
--payload '{"gitFarmRepo":"${{ secrets.GITFARM_LAN_SDK_REPO }}","gitFarmBranch":"${{ secrets.GITFARM_LAN_SDK_BRANCH }}","gitFarmFilepath":"${{ steps.whl_name.outputs.whl_name }}","s3Bucket":"${{ secrets.S3_BUCKET_NAME }}","s3FilePath":"${{ steps.whl_name.outputs.whl_name }}"}' \
77+
--cli-binary-format raw-in-base64-out \
78+
output.txt
79+
- name: Check for error in lambda invoke
80+
run: |
81+
if grep -q "Error" output.txt; then
82+
cat output.txt
83+
exit 1
84+
fi

0 commit comments

Comments
 (0)