Skip to content

add multi-arch dockerfile and remove mips64le architecture #676

add multi-arch dockerfile and remove mips64le architecture

add multi-arch dockerfile and remove mips64le architecture #676

Workflow file for this run

name: build flannel
on: [push, pull_request]
env:
GO_VERSION: "1.20"
LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le riscv64"
REPOSITORY: flannel/flannel
jobs:
build-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: set tag
run: echo "GIT_TAG=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: go mod vendor
run: go mod vendor
- name: build linux
run: |
set -e
for arch in ${LINUX_ARCHES}; do
echo "Building for arch $arch"
ARCH=$arch make dist/flanneld-$arch
file dist/flanneld-$arch
done
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REPOSITORY }}
flavor: latest=false
tags: |
type=ref, event=branch
- name: Build and push Docker image
# if: github.repository_owner == 'flannel-io' && success()
uses: docker/build-push-action@v5
with:
context: .
file: images/Dockerfile
push: false
platforms: linux/amd64,linux/arm64,linux/arm,linux/s390x,linux/ppc64le,linux/riscv64
tags: ${{ steps.meta.outputs.tags }}
build-args: TAG=${{ env.GIT_TAG }}