Skip to content

[pre-commit.ci] pre-commit autoupdate #345

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #345

name: release-docker
on:
workflow_dispatch:
push:
branches:
- 'develop'
- 'docker'
tags:
- 'v*'
pull_request:
branches:
- 'develop'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Check out the repo
uses: actions/checkout@v4
- name: Extract metadata (tags, labels) for Docker Hub
id: meta_dockerhub
uses: docker/metadata-action@v5
with:
images: "openml/openml-python"
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: ./docker/
tags: ${{ steps.meta_dockerhub.outputs.tags }}
labels: ${{ steps.meta_dockerhub.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' }}
- name: Update repo description
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: openml/openml-python
short-description: "pre-installed openml-python environment"
readme-filepath: ./docker/readme.md
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}