Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add riscv64 arch in GH actions #1833

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading