Skip to content

Commit

Permalink
Update the pypi wait (#1554)
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor authored and eapolinario committed May 16, 2023
1 parent f6331ca commit 2731766
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,28 @@ jobs:
run: |
make -C plugins build_all_plugins
make -C plugins publish_all_plugins
# Added sleep because PYPI take some time in publish
- name: Sleep for 180 seconds
uses: jakejarvis/wait-action@master
with:
time: '180s'
- name: Sleep until pypi is available
id: pypiwait
run: |
# from refs/tags/v1.2.3 get 1.2.3 and make sure it's not an empty string
VERSION=$(echo $GITHUB_REF | sed 's#.*/v##')
if [ -z "$VERSION" ]
then
echo "No tagged version found, exiting"
exit 1
fi
LINK="https://pypi.org/project/flytekit/${VERSION}"
for i in {1..60}; do
if curl -L -I -s -f ${LINK} >/dev/null; then
echo "Found pypi"
exit 0
else
echo "Did not find - Retrying in 10 seconds..."
sleep 10
fi
done
exit 1
shell: bash
outputs:
version: ${{ steps.bump.outputs.version }}

Expand Down

0 comments on commit 2731766

Please sign in to comment.