Skip to content

improved docs + auto-push to dockerhub #28

improved docs + auto-push to dockerhub

improved docs + auto-push to dockerhub #28

Workflow file for this run

name: Python tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false
installer-parallel: true
version: 1.2.2
- name: Install dependencies
run: |
poetry install --no-dev
sh install_local_dependency.sh
# Before running the test you have to download the tags!
- name: Run tests
run: |
python get_data/get_fpbase_data.py allele_components/tags_fpbase.toml
cd genestorian_module/test
python -m unittest
# Update docker image when committing to master branch if tests pass
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v2
with:
images: genestorian_data_refinement
- name: Build and push Docker images
uses: docker/build-push-action@v3.1.1
with:
context: .
push: true
tags: manulera/genestorian_data_refinement:latest
labels: ${{ steps.meta.outputs.labels }}