Merge pull request #86 from Clinical-Genomics-Lund/v0.10.0 #16
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 dockerhub on push to master | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout prp | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: 'docker.io' | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Export tags to env | |
run: | | |
VERSION=$(head -2 prp/__version__.py | tail -1 | cut -d'"' -f2); | |
echo "PRP_TAG=${VERSION}" >> $GITHUB_ENV | |
echo "PRP_TAG_LATEST=latest" >> $GITHUB_ENV | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/[email protected] | |
with: | |
images: clinicalgenomicslund/bonsai-prp | |
tags: | | |
type=raw,value=${{ env.PRP_TAG_LATEST }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }}, | |
labels: ${{ steps.meta.outputs.labels }} |