mirror of
https://github.com/Telecominfraproject/oopt-tai.git
synced 2026-01-01 19:32:16 +00:00
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: ci
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
with:
|
|
driver: docker-container
|
|
driver-opts: |
|
|
image=moby/buildkit:master
|
|
network=host
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
-
|
|
name: Set up local container registry
|
|
run: docker run -d -p 5000:5000 registry
|
|
-
|
|
name: Build builder
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
file: ./docker/builder.Dockerfile
|
|
tags: |
|
|
localhost:5000/tai-builder:${{ github.sha }}
|
|
push: true
|
|
cache-from: type=registry,ref=docker.io/microsonic/tai-builder:latest
|
|
cache-to: type=inline
|
|
-
|
|
name: Build container
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
build-args: |
|
|
TAI_DOCKER_BUILDER_IMAGE=localhost:5000/tai-builder:${{ github.sha }}
|
|
platforms: linux/amd64,linux/arm64
|
|
file: ./docker/run.Dockerfile
|
|
tags: |
|
|
localhost:5000/tai:${{ github.sha }}
|
|
push: true
|
|
cache-from: type=registry,ref=docker.io/microsonic/tai:latest
|
|
cache-to: type=inline
|
|
-
|
|
name: Run test
|
|
run: make ci
|
|
env:
|
|
TAI_DOCKER_CMD_IMAGE: localhost:5000/tai-builder:${{ github.sha }}
|