Skip to content

make manylinux version optional argument #5

make manylinux version optional argument

make manylinux version optional argument #5

name: Build Docker Images
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
env:
REGISTRY: ghcr.io
jobs:
build:
name: build ((${{ matrix.platform.docker_platform}})
runs-on: ubuntu-latest
strategy:
matrix:
version: ["2_28"]
platform:
- arch: "x86_64"
runner_arch: "X64"
docker_platform: "linux/amd64"
- arch: 'aarch64'
runner_arch: "ARM64"
docker_platform: "linux/arm64"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
if: ${{ env.RUNNER_ARCH }} != ${{ matrix.platform.runner_arch }}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to the container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/manylinux_${{ matrix.version }}_conda_epics
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ matrix.platform.docker_platform }}
push: ${{ github.event_name != 'pull_request' }}
build-args: |
VER=${{ matrix.version }}
ARCH=${{ matrix.platform.arch }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}