Skip to content

Commit e1eaa18

Browse files
committed
Wait for PyPI index propagation before Docker build
Polls PyPI for up to 2 minutes to ensure the newly published package version is available before the Docker build tries to install it.
1 parent 8a936fe commit e1eaa18

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/release.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,18 @@ jobs:
103103
echo "### Versions" >> "$GITHUB_STEP_SUMMARY"
104104
echo "- Loader: ${LOADER_VERSION}" >> "$GITHUB_STEP_SUMMARY"
105105
106+
- name: Wait for PyPI index propagation
107+
run: |
108+
for i in $(seq 1 12); do
109+
if pip index versions zodb-pgjsonb-thumborblobloader 2>/dev/null | grep -q "${{ steps.versions.outputs.loader }}"; then
110+
echo "Version ${{ steps.versions.outputs.loader }} available on PyPI"
111+
exit 0
112+
fi
113+
echo "Waiting for PyPI index (attempt $i/12)..."
114+
sleep 10
115+
done
116+
echo "::warning::Version not yet visible on PyPI after 2 minutes, proceeding anyway"
117+
106118
- uses: docker/setup-qemu-action@v3
107119

108120
- uses: docker/setup-buildx-action@v3

0 commit comments

Comments
 (0)