Skip to content

Commit

Permalink
ci(python): improve pypi package availability check (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisBRENON authored Oct 11, 2024
1 parent fcf36b8 commit eb7a9aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,17 @@ jobs:
- name: Wait for package availability
if: ${{ github.event_name == 'push' }}
run: |
bash -c '
bash -xc '
try=10
while [ "$try" -gt 0 ]; do
sleep 5
curl https://${{ github.ref_type != 'tag' && 'test.' || '' }}pypi.org/simple/greenbids-tailor/ | grep -q greenbids_tailor-${{ inputs.app-version }} && exit 0
url="$(curl https://${{ github.ref_type != 'tag' && 'test.' || '' }}pypi.org/simple/greenbids-tailor/ | grep greenbids_tailor-${{ inputs.app-version }} | sed -Ee 's/.*href="([^"]+)".*/\1/')"
if [ "$url" ]; then
curl -I "$url" | grep -q -E '^HTTP.*200' && exit 0
try=$(( try - 1 ))
done
exit 1
'
sleep 5
- name: Build and push Docker image
id: push
Expand Down

0 comments on commit eb7a9aa

Please sign in to comment.