Skip to content

Commit

Permalink
wait_for_pip
Browse files Browse the repository at this point in the history
  • Loading branch information
lavie committed Feb 25, 2023
1 parent 94fe4b0 commit 0e9e3e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
- run: make pypi
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }}
- run: bin/wait_for_pip.sh $(poetry run ./current_version.py)
- name: Log into Dockerhub
uses: docker/login-action@v2
with:
Expand Down
13 changes: 13 additions & 0 deletions bin/wait_for_pip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash -eu

VER="$1"

for tries in {1..10}; do
if curl -s https://pypi.org/pypi/runlike/json | jq '.releases | keys' | grep "$VER"; then
exit 0;
fi
echo still waiting for $VER to appear...;
sleep 2;
done

exit 1

0 comments on commit 0e9e3e7

Please sign in to comment.