Skip to content
name: Publish PathML Docker image on Docker Hub
on:
workflow_dispatch:
release:
types:
- published
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set version number variable
run: |
VER=$(cat pathml/_version.py | grep -o '"[^"]\+"' | tr -d '"')
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
pathml/pathml:latest
pathml/pathml:${{ env.VERSION }}