-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a wait for response from pypi before building and pushing the doc…
…ker image
- Loading branch information
Showing
1 changed file
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,26 +34,35 @@ jobs: | |
poetry publish --build --username __token__ --password "${PYPI_TOKEN}" | ||
- name: Set VERSION environment variable | ||
id: set-version | ||
shell: micromamba-shell {0} | ||
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV | ||
|
||
- name: Build and publish Docker image | ||
shell: micromamba-shell {0} | ||
env: | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_PUSH_TOKEN: ${{ secrets.DOCKER_HUB_PUSH_TOKEN }} | ||
run: make build-and-publish-dockerhub-image | ||
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_OUTPUT | ||
|
||
- name: Create tag | ||
shell: micromamba-shell {0} | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git tag v$VERSION | ||
git tag v${{ steps.set-version.outputs.VERSION }} | ||
git push origin --tags | ||
- name: Create Github release | ||
shell: micromamba-shell {0} | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh release create v$VERSION --generate-notes | ||
run: gh release create v${{ steps.set-version.outputs.VERSION }} --generate-notes | ||
|
||
- name: Wait for Pypi version to be available | ||
uses: cygnetdigital/[email protected] | ||
with: | ||
url: 'https://pypi.org/project/copernicusmarine/${{ steps.set-version.outputs.VERSION }}/' | ||
responseCode: '200' | ||
timeout: 600000 | ||
interval: 5000 | ||
|
||
- name: Build and publish Docker image | ||
shell: micromamba-shell {0} | ||
env: | ||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_PUSH_TOKEN: ${{ secrets.DOCKER_HUB_PUSH_TOKEN }} | ||
run: make build-and-publish-dockerhub-image |