File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,29 @@ jobs:
17
17
18
18
- name : Get release tag
19
19
id : get_tag
20
- run : echo "::set-output name= tag:: ${GITHUB_REF#refs/tags/}"
20
+ run : echo "tag= ${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
21
21
22
22
- name : Trigger JitPack Build
23
23
run : |
24
24
TAG=${{ steps.get_tag.outputs.tag }}
25
25
JITPACK_BUILD_URL="https://jitpack.io/com/github/cbioportal/cbioportal-frontend/$TAG/build.log"
26
- echo "Triggering JitPack build for $TAG"
27
- curl -I $JITPACK_BUILD_URL
28
-
29
- - name : Notify success
30
- run : echo "JitPack build triggered successfully."
26
+
27
+ MAX_RETRIES=10
28
+ RETRY_DELAY=30
29
+ COUNTER=0
30
+
31
+ while [ $COUNTER -lt $MAX_RETRIES ]; do
32
+ HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$JITPACK_BUILD_URL")
33
+
34
+ if [ "$HTTP_STATUS" -eq 200 ]; then
35
+ echo "Build triggered successfully for version ${TAG}."
36
+ exit 0
37
+ else
38
+ echo "Attempt $((COUNTER+1)) failed with status $HTTP_STATUS: Tag not found yet. Retrying in $RETRY_DELAY seconds..."
39
+ ((COUNTER++))
40
+ sleep $RETRY_DELAY
41
+ fi
42
+ done
43
+
44
+ echo "Failed to trigger JitPack build after $MAX_RETRIES attempts."
45
+ exit 1
You can’t perform that action at this time.
0 commit comments