Skip to content

Commit

Permalink
Merge pull request #1833 from thomasferrandiz/fix-riscv64
Browse files Browse the repository at this point in the history
Add riscv64 arch in GH actions
  • Loading branch information
thomasferrandiz authored Dec 1, 2023
2 parents 54077c6 + bdb1f96 commit 223db64
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -148,13 +154,15 @@ 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
docker manifest annotate ${{ steps.meta.outputs.tags }} ${{ steps.meta.outputs.tags }}-arm --arch arm
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
Expand Down

0 comments on commit 223db64

Please sign in to comment.