Skip to content

Set the prefix for the github action that publishes to docker. #4

Set the prefix for the github action that publishes to docker.

Set the prefix for the github action that publishes to docker. #4

Workflow file for this run

name: release-docker
on:
workflow_dispatch:
push:
tags:
- 'v*'
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/frontend"
tags: |
type=semver,pattern={{raw}},prefix=dev_
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
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@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: openml/frontend
short-description: "Frontend for OpenML."
readme-filepath: ./docker/README.md
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}