Release 4.13.6 #75
Workflow file for this run
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
name: Publish to PyPI and Docker | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build-n-publish: | |
name: Build and publish Python distribution to PyPI | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out git repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install poetry | |
uses: snok/install-poetry@v1 | |
- name: Build and Publish Distribution to PyPI 📦 | |
env: | |
PYPI_USERNAME: __token__ | |
PYPI_PASSWORD: ${{ secrets.pypi_password }} | |
POETRY_REQUESTS_TIMEOUT: 60 | |
run: | | |
poetry publish --no-interaction --build \ | |
--username $PYPI_USERNAME \ | |
--password $PYPI_PASSWORD | |
push_to_registry: | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Create tags | |
id: create_tags | |
run: | | |
VERSION=$(echo ${GITHUB_REF#refs/tags/}) | |
TAGS="clinicalgenomics/housekeeper:$VERSION,clinicalgenomics/housekeeper:latest" | |
echo "TAGS=$TAGS" >> $GITHUB_ENV | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: ${{ env.TAGS }} |