Skip to content

Suppot Multi-platform images. #5

Suppot Multi-platform images.

Suppot Multi-platform images. #5

name: Multi-arch image build
on:
workflow_dispatch:
push:
branches:
- "dev"
- "releases/**"
tags:
- '*'
pull_request:
branches:
- "dev"
- "releases/**"
jobs:
build-and-test-multi-arch-images-on-ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 120
env:
DOCKER_REGISTRY_USER: ${{ secrets.DOCKER_REGISTRY_USER }}
DOCKER_REGISTRY_KEY: ${{ secrets.DOCKER_REGISTRY_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Free up space in github runner
run: |
df -h
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/share/powershell /usr/share/swift /usr/lib/jvm /usr/local/.ghcup
sudo docker rmi $(docker image ls -aq) >/dev/null 2>&1 || true
df -h
- name: build multi arch image
run: |
cd transforms/universal/noop/ray
make multiarch_image
docker buildx build -t noop-ray:latest-multiarch --load .
docker ps
docker run -t --rm noop-ray:latest-multiarch pytest -s test
docker login quay.io -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_KEY
docker buildx build --platform=linux/amd64,linux/arm64 -t quay.io/dataprep1/data-prep-kit/noop-ray:latest-multiarch --push .
docker ps
test-multi-arch-images-on-ubuntu:
runs-on: ubuntu-22.04
timeout-minutes: 120
steps:
- name: Test multi-arch image
needs: [build-and-test-multi-arch-images-on-ubuntu]

Check failure on line 53 in .github/workflows/test-image-multiarch.yml

View workflow run for this annotation

GitHub Actions / Multi-arch image build

Invalid workflow file

The workflow is not valid. .github/workflows/test-image-multiarch.yml (Line: 53, Col: 15): Unexpected value 'needs'
run: |
docker pull quay.io/dataprep1/data-prep-kit/noop-ray:latest-multiarch
docker run -t --rm quay.io/dataprep1/data-prep-kit/noop-ray:latest-multiarch pytest -s test