Skip to content

Build Base

Build Base #454

name: Build Base
on: workflow_dispatch
jobs:
build-amd64:
name: Build AMD64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Build
run: |
make base-amd64
make base-tar-amd64
- name: Upload image to artifact
uses: actions/upload-artifact@v3
with:
name: image-amd64
path: image-amd64.tar
build-arm64:
name: Build ARM64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Build
run: |
make base-arm64 || make base-arm64
make base-tar-arm64
- name: Upload image to artifact
uses: actions/upload-artifact@v3
with:
name: image-arm64
path: image-arm64.tar
push:
needs:
- build-arm64
- build-amd64
name: push
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Download image
uses: actions/download-artifact@v3
with:
name: image-amd64
- name: Download image
uses: actions/download-artifact@v3
with:
name: image-arm64
- name: Load Image
run: |
docker load --input image-amd64.tar
docker load --input image-arm64.tar
- name: Push
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
COMMIT: ${{ github.sha }}
run: |
cat VERSION
TAG=$(cat VERSION)
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker images
docker push kubeovn/kube-ovn-base:$TAG-amd64
docker push kubeovn/kube-ovn-base:$TAG-amd64-no-avx512
docker push kubeovn/kube-ovn-base:$TAG-debug-amd64
docker push kubeovn/kube-ovn-base:$TAG-arm64
docker push kubeovn/kube-ovn-base:$TAG-debug-arm64
docker manifest create kubeovn/kube-ovn-base:$TAG kubeovn/kube-ovn-base:$TAG-amd64 kubeovn/kube-ovn-base:$TAG-arm64
docker manifest push kubeovn/kube-ovn-base:$TAG
docker manifest create kubeovn/kube-ovn-base:$TAG-no-avx512 kubeovn/kube-ovn-base:$TAG-amd64-no-avx512
docker manifest push kubeovn/kube-ovn-base:$TAG-no-avx512
docker manifest create kubeovn/kube-ovn-base:$TAG-debug kubeovn/kube-ovn-base:$TAG-debug-amd64 kubeovn/kube-ovn-base:$TAG-debug-arm64
docker manifest push kubeovn/kube-ovn-base:$TAG-debug