This action allows you to wait for a pypi package to become available.
Typically used after pushing a new package and you want to push a docker image with the preinstalled binary after.
Create a workflow .yml
file in your repositories .github/workflows
directory. An example workflow is available below.
package_name
- The name of the package as you would use it inpip install package_name
. Required.package_version
- The version of the package that should be waited for. Example:1.4.2
. Required.timeout
- How long we should maximum wait in seconds. Example:60
, default:30
.delay_between_requests
- Delay between requests in seconds. Example:5
, default:1
.
name: Release on pip and dockerhub
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Assuming this has outputs.version
- name: release pip package
id: release
run: ./release-sh
- name: Wait for package to become available
uses: databutton/wait-for-pypi@main
with:
package_name: my-package
package_version: ${{ steps.release.outputs.version }}
# This runs after the pip package is available, so you can now push the docker image
- name: Release on dockerhub
run: docker build -t $IMAGE_NAME:${{ steps.release.outputs.version }}
The scripts and documentation in this project are released under the MIT License