Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI action for uploading Docker image for wheels #3268

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
57 changes: 57 additions & 0 deletions .github/workflows/wheel_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build custom Docker image for manylinux wheels

on:
workflow_dispatch:
inputs:
base_image:
description: 'The base Docker image to use'
default: 'manylinux2014'
type: choice
options:
- 'manylinux2014'
- 'manylinux_2_28'
- 'manylinux_2_34'

upload:
description: 'Whether to upload (push) the image to DockerHub'
default: 'false'
required: true
type: 'boolean'

tag:
description: 'The tag for the final Docker image'
default: 'latest'
required: true

jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platform: 'linux/amd64'
arch: 'x86_64'
- platform: 'linux/arm64'
arch: 'aarch64'

steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: ${{ matrix.platform }}
push: ${{ github.event.inputs.upload }}
tags: neuronsimulator/neuron_wheel:${{ github.event.inputs.tag }}-${{ matrix.arch }}
build-args: |
MANYLINUX_IMAGE: ${{ github.event.inputs.base_image }}_${{ matrix.arch }}
Loading