From bdb1f96ab99656abfed4d640881cd1a7ff8fa3fa Mon Sep 17 00:00:00 2001 From: Thomas Ferrandiz Date: Thu, 30 Nov 2023 14:51:19 +0000 Subject: [PATCH] Add riscv64 arch in GH actions --- .github/workflows/build.yaml | 9 ++++++++- .github/workflows/release.yml | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7f334aa937..d0c3c09c8d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: [push, pull_request] env: GO_VERSION: "1.20" - LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le" + LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le riscv64" jobs: build-images: @@ -78,3 +78,10 @@ jobs: context: . file: images/Dockerfile.mips64le push: false + + - name: Build Docker image for riscv64 + uses: docker/build-push-action@v4 + with: + context: . + file: images/Dockerfile.riscv64 + push: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31fb3884dc..534c3d0e52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: env: GO_VERSION: "1.20" - LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le" + LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le mips64le riscv64" REPOSITORY: flannel/flannel jobs: @@ -92,6 +92,12 @@ jobs: docker build -f images/Dockerfile.mips64le -t ${{ steps.meta.outputs.tags }}-mips64le . docker push ${{ steps.meta.outputs.tags }}-mips64le + - name: Build and push Docker image for riscv64 + if: github.repository_owner == 'flannel-io' + run: | + docker build -f images/Dockerfile.riscv64 -t ${{ steps.meta.outputs.tags }}-riscv64 . + docker push ${{ steps.meta.outputs.tags }}-riscv64 + build-and-push-multi-arch-image: needs: [build-and-push-images] runs-on: ubuntu-latest @@ -148,6 +154,7 @@ jobs: docker pull ${{ steps.meta.outputs.tags }}-ppc64le docker pull ${{ steps.meta.outputs.tags }}-s390x docker pull ${{ steps.meta.outputs.tags }}-mips64le + docker pull ${{ steps.meta.outputs.tags }}-riscv64 docker manifest create ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-amd64 ${{ steps.meta.outputs.tags }}-arm64 ${{ steps.meta.outputs.tags }}-arm ${{ steps.meta.outputs.tags }}-ppc64le ${{ steps.meta.outputs.tags }}-s390x ${{ steps.meta.outputs.tags }}-mips64le docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-amd64 --arch amd64 docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-arm64 --arch arm64 @@ -155,6 +162,7 @@ jobs: docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-ppc64le --arch ppc64le docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-s390x --arch s390x docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-mips64le --arch mips64le + docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-riscv64 --arch riscv64 docker manifest push ${{ steps.meta.outputs.tags }} docker pull ${{ steps.meta.outputs.tags }} docker tag ${{ steps.meta.outputs.tags }} ${{ env.REPOSITORY }}:latest