File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 32
32
env :
33
33
VERSION : ${{ env.VERSION }}
34
34
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
36
36
echo "Version ${VERSION} already exists on Test PyPI"
37
37
echo "exists=true" >> $GITHUB_OUTPUT
38
38
else
@@ -103,16 +103,16 @@ jobs:
103
103
env :
104
104
VERSION : ${{ env.VERSION }}
105
105
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
109
109
echo "Package ${VERSION} is now available on Test PyPI"
110
110
exit 0
111
111
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
114
114
done
115
- echo "Package ${VERSION} not available after 5 attempts "
115
+ echo "Package ${VERSION} not available after 10 minutes "
116
116
exit 1
117
117
118
118
- name : Login to Docker Hub
You can’t perform that action at this time.
0 commit comments