File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 3232 env :
3333 VERSION : ${{ env.VERSION }}
3434 run : |
35- if curl -s https://test.pypi.org/pypi/socketsecurity/$VERSION/json | grep -q '"version": "'$VERSION'"' ; then
35+ if curl -s -f https://test.pypi.org/pypi/socketsecurity/$VERSION/json > /dev/null ; then
3636 echo "Version ${VERSION} already exists on Test PyPI"
3737 echo "exists=true" >> $GITHUB_OUTPUT
3838 else
@@ -103,16 +103,16 @@ jobs:
103103 env :
104104 VERSION : ${{ env.VERSION }}
105105 run : |
106- # Wait for package to be available (try up to 5 times with 60s delay)
107- for i in {1..5 }; do
108- if curl -s https://test.pypi.org/pypi/socketsecurity/$VERSION/json | grep -q '"version": "'$VERSION'"' ; then
106+ # Wait for package to be available (try up to 30 times with 20s delay - total 10 minutes )
107+ for i in {1..30 }; do
108+ if curl -s -f https://test.pypi.org/pypi/socketsecurity/$VERSION/json > /dev/null ; then
109109 echo "Package ${VERSION} is now available on Test PyPI"
110110 exit 0
111111 fi
112- echo "Attempt $i: Package not yet available, waiting 60s ..."
113- sleep 60
112+ echo "Attempt $i: Package not yet available, waiting 20s ... (${i}/30) "
113+ sleep 20
114114 done
115- echo "Package ${VERSION} not available after 5 attempts "
115+ echo "Package ${VERSION} not available after 10 minutes "
116116 exit 1
117117
118118 - name : Login to Docker Hub
You can’t perform that action at this time.
0 commit comments