Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/scripts/get-CI-result.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/bin/bash

# 检查参数
if [ $# -ne 2 ]; then
echo "Usage: $0 <COMMIT_ID> <SECURITY>"
if [ $# -ne 3 ]; then
echo "Usage: $0 <COMMIT_ID> <SECURITY> <REPOSITORY>"
exit 1
fi

COMMIT_ID=$1
SECURITY=$2
REPOSITORY=$3

# 设置最大等待时间
MAX_WAIT_TIME=7200
Expand All @@ -18,7 +19,7 @@ while true; do

response=$(curl -s -H "Content-Type: application/json" \
-H "Authorization: Basic ${SECURITY}" \
-d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"commitId\": \"${COMMIT_ID}\"}" "http://get-tasend-back-twkvcdsbpj.cn-hangzhou.fcapp.run")
-d "{\"type\": \"RETRIEVE-TASK-STATUS\", \"repositoryUrl\": \"${REPOSITORY}\", \"commitId\": \"${COMMIT_ID}\"}" "http://get-tasend-back-twkvcdsbpj.cn-hangzhou.fcapp.run")
echo "Response: $response"

# 检查curl是否成功
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/trigger-CI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ curl -v -H "Content-Type: application/json" \
\"type\": \"CREATE-TASK\",
\"commitId\": \"${COMMIT_ID}\",
\"repositoryUrl\": \"${REPO_URL}\",
\"prId\": \"${GITHUB_PR_ID}\",
\"aone\": { \"projectId\": \"${PROJECT_ID}\", \"pipelineId\": \"${PIPELINE_ID}\"},
\"newBranch\": { \"name\": \"${BRANCH_NAME}\", \"ref\": \"${BRANCH_REF}\" },
\"params\": {\"cancel-in-progress\": \"${CANCEL_IN_PROGRESS}\", \"github_commit\":\"${GITHUB_COMMIT_ID}\", \"github_source_repo\": \"${GITHUB_SOURCE_REPO}\"}
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/trigger-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ curl -v -H "Content-Type: application/json" \
\"type\": \"CREATE-TASK\",
\"commitId\": \"${COMMIT_ID}\",
\"repositoryUrl\": \"${REPO_URL}\",
\"prId\": \"${GITHUB_PR_ID}\",
\"aone\": { \"projectId\": \"${PROJECT_ID}\", \"pipelineId\": \"${PIPELINE_ID}\"},
\"newBranch\": { \"name\": \"${BRANCH_NAME}\", \"ref\": \"${BRANCH_REF}\" },
\"params\": {\"cancel-in-progress\": \"${CANCEL_IN_PROGRESS}\", \"github_commit\":\"${GITHUB_COMMIT_ID}\", \"github_source_repo\": \"${GITHUB_SOURCE_REPO}\", \"checkout_submodules\": \"${CHECKOUT_SUBMODULES}\", \"checkout_username\": \"${CHECK_USER_NAME}\", \"checkout_token\": \"${CHECK_TOKEN}\"}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-request-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
run: |
COMMIT_ID=$([ "${{ github.event_name }}" == "pull_request" ] && echo "${{ github.event.pull_request.head.sha }}" || echo "${{ github.sha }}")
echo "Using Commit ID: $COMMIT_ID"
./get-CI-result.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}"
./get-CI-result.sh "$COMMIT_ID" "${{ secrets.CI_SECRET }}" "${{ github.repository }}"
Loading