Skip to content

Commit 4000675

Browse files
authored
CI: Wait for PyPI to publish before building Dockerfile (#1437)
### Summary > Describe your changes. When making a new release, we 1. publish the release to PyPI 2. install it from PyPI to the Dockerfile 3. publish that Dockerfile to GHCR After publishing to PyPI however we need a few more seconds for the package to be available. Currently we skip over this and the latest release is not available, causing the build to fail. ![image](https://github.com/user-attachments/assets/4d7aa967-d0e6-4ed8-8ef1-be25b573eb06) https://github.com/cartography-cncf/cartography/actions/runs/12577359450/job/35054696773 This PR makes it so that we now wait 10 seconds for PyPI before attempting to build the image. Signed-off-by: Alex Chantavy <[email protected]>
1 parent 689768b commit 4000675

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish-to-ghcr-and-pypi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ jobs:
7373
# for more detailed information.
7474
password: ${{ secrets.GITHUB_TOKEN }}
7575

76-
# Get the cartography version from the GitHub release event metadata
77-
- name: Extract version
76+
# Get the cartography version from the GitHub release event metadata and sleep to wait for PyPI to finish publishing
77+
- name: Extract version and sleep
7878
id: version
79-
run: echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
79+
run: |
80+
echo "VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
81+
sleep 10
8082
8183
- name: Build and push
8284
uses: docker/build-push-action@v3

0 commit comments

Comments
 (0)