mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-08-02 00:19:10 +00:00
Add arm64 build in CI workflow
This commit is contained in:
parent
f885b38332
commit
c7cd0ef822
12
.github/workflows/docker-build-push-master.yml
vendored
12
.github/workflows/docker-build-push-master.yml
vendored
@ -23,6 +23,9 @@ jobs:
|
||||
- name: Build latest-ppc64le
|
||||
run: docker build -t ${REPOSITORY}:latest-ppc64le -f Dockerfile.ppc64le .
|
||||
|
||||
- name: Build latest-arm64v8
|
||||
run: docker build -t ${REPOSITORY}:latest-arm64v8 -f Dockerfile.arm64 .
|
||||
|
||||
- name: Build latest-origin
|
||||
run: docker build -t ${REPOSITORY}:latest-origin -f Dockerfile.openshift .
|
||||
|
||||
@ -30,6 +33,7 @@ jobs:
|
||||
run: |
|
||||
docker tag ${REPOSITORY}:latest-amd64 ${REPOSITORY}:snapshot-amd64
|
||||
docker tag ${REPOSITORY}:latest-ppc64le ${REPOSITORY}:snapshot-ppc64le
|
||||
docker tag ${REPOSITORY}:latest-arm64v8 ${REPOSITORY}:snapshot-arm64v8
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${REPOSITORY_USER} -p ${{ secrets. REPOSITORY_PASS }}
|
||||
@ -38,16 +42,20 @@ jobs:
|
||||
run: |
|
||||
docker push ${REPOSITORY}:latest-amd64
|
||||
docker push ${REPOSITORY}:latest-ppc64le
|
||||
docker push ${REPOSITORY}:latest-arm64v8
|
||||
docker push ${REPOSITORY}:snapshot-amd64
|
||||
docker push ${REPOSITORY}:snapshot-ppc64le
|
||||
docker push ${REPOSITORY}:snapshot-arm64v8
|
||||
|
||||
- name: Create manifest for multi-arch images
|
||||
run: |
|
||||
docker manifest create ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-amd64 ${REPOSITORY}:snapshot-ppc64le
|
||||
docker manifest create ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-amd64 ${REPOSITORY}:snapshot-ppc64le ${REPOSITORY}:snapshot-arm64v8
|
||||
docker manifest annotate ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-amd64 --arch amd64
|
||||
docker manifest annotate ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-ppc64le --arch ppc64le
|
||||
docker manifest annotate ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-arm64v8 --arch arm64v8
|
||||
docker manifest push ${REPOSITORY}:snapshot
|
||||
docker manifest create ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 ${REPOSITORY}:latest-ppc64le
|
||||
docker manifest create ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 ${REPOSITORY}:latest-ppc64le ${REPOSITORY}:latest-arm64v8
|
||||
docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 --arch amd64
|
||||
docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-ppc64le --arch ppc64le
|
||||
docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-arm64v8 --arch arm64v8
|
||||
docker manifest push ${REPOSITORY}:latest
|
||||
|
17
.github/workflows/docker-build-push-release.yml
vendored
17
.github/workflows/docker-build-push-release.yml
vendored
@ -23,6 +23,9 @@ jobs:
|
||||
- name: Build latest-ppc64le
|
||||
run: docker build -t ${REPOSITORY}:latest-ppc64le -f Dockerfile.ppc64le .
|
||||
|
||||
- name: Build latest-arm64v8
|
||||
run: docker build -t ${REPOSITORY}:latest-arm64v8 -f Dockerfile.arm64 .
|
||||
|
||||
- name: Build latest-origin
|
||||
run: docker build -t ${REPOSITORY}:latest-origin -f Dockerfile.openshift .
|
||||
|
||||
@ -30,8 +33,10 @@ jobs:
|
||||
run: |
|
||||
docker tag ${REPOSITORY}:latest-amd64 ${REPOSITORY}:stable-amd64
|
||||
docker tag ${REPOSITORY}:latest-ppc64le ${REPOSITORY}:stable-ppc64le
|
||||
docker tag ${REPOSITORY}:latest-arm64v8 ${REPOSITORY}:stable-arm64v8
|
||||
docker tag ${REPOSITORY}:latest-amd64 ${REPOSITORY}:${GITHUB_REF##*/}-amd64
|
||||
docker tag ${REPOSITORY}:latest-ppc64le ${REPOSITORY}:${GITHUB_REF##*/}-ppc64le
|
||||
docker tag ${REPOSITORY}:latest-arm64v8 ${REPOSITORY}:${GITHUB_REF##*/}-arm64v8
|
||||
|
||||
- name: Login to registry
|
||||
run: docker login -u ${REPOSITORY_USER} -p ${{ secrets. REPOSITORY_PASS }}
|
||||
@ -40,22 +45,28 @@ jobs:
|
||||
run: |
|
||||
docker push ${REPOSITORY}:latest-amd64
|
||||
docker push ${REPOSITORY}:latest-ppc64le
|
||||
docker push ${REPOSITORY}:latest-arm64v8
|
||||
docker push ${REPOSITORY}:stable-amd64
|
||||
docker push ${REPOSITORY}:stable-ppc64le
|
||||
docker push ${REPOSITORY}:stable-arm64v8
|
||||
docker push ${REPOSITORY}:${GITHUB_REF##*/}-amd64
|
||||
docker push ${REPOSITORY}:${GITHUB_REF##*/}-ppc64le
|
||||
docker push ${REPOSITORY}:${GITHUB_REF##*/}-arm64v8
|
||||
|
||||
- name: Create manifest for multi-arch images
|
||||
run: |
|
||||
docker manifest create ${REPOSITORY}:stable ${REPOSITORY}:stable-amd64 ${REPOSITORY}:stable-ppc64le
|
||||
docker manifest create ${REPOSITORY}:stable ${REPOSITORY}:stable-amd64 ${REPOSITORY}:stable-ppc64le ${REPOSITORY}:stable-arm64v8
|
||||
docker manifest annotate ${REPOSITORY}:stable ${REPOSITORY}:stable-amd64 --arch amd64
|
||||
docker manifest annotate ${REPOSITORY}:stable ${REPOSITORY}:stable-ppc64le --arch ppc64le
|
||||
docker manifest annotate ${REPOSITORY}:stable ${REPOSITORY}:stable-arm64v8 --arch arm64v8
|
||||
docker manifest push ${REPOSITORY}:stable
|
||||
docker manifest create ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 ${REPOSITORY}:latest-ppc64le
|
||||
docker manifest create ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 ${REPOSITORY}:latest-ppc64le ${REPOSITORY}:latest-arm64v8
|
||||
docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 --arch amd64
|
||||
docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-ppc64le --arch ppc64le
|
||||
docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-arm64v8 --arch arm64v8
|
||||
docker manifest push ${REPOSITORY}:latest
|
||||
docker manifest create ${REPOSITORY}:${GITHUB_REF##*/} ${REPOSITORY}:${GITHUB_REF##*/}-amd64 ${REPOSITORY}:${GITHUB_REF##*/}-ppc64le
|
||||
docker manifest create ${REPOSITORY}:${GITHUB_REF##*/} ${REPOSITORY}:${GITHUB_REF##*/}-amd64 ${REPOSITORY}:${GITHUB_REF##*/}-ppc64le ${REPOSITORY}:${GITHUB_REF##*/}-arm64v8
|
||||
docker manifest annotate ${REPOSITORY}:${GITHUB_REF##*/} ${REPOSITORY}:${GITHUB_REF##*/}-amd64 --arch amd64
|
||||
docker manifest annotate ${REPOSITORY}:${GITHUB_REF##*/} ${REPOSITORY}:${GITHUB_REF##*/}-ppc64le --arch ppc64le
|
||||
docker manifest annotate ${REPOSITORY}:${GITHUB_REF##*/} ${REPOSITORY}:${GITHUB_REF##*/}-arm64v8 --arch arm64v8
|
||||
docker manifest push ${REPOSITORY}:${GITHUB_REF##*/}
|
||||
|
25
.github/workflows/go-build-arm64.yml
vendored
Normal file
25
.github/workflows/go-build-arm64.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
name: Go-build-ppc64le
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build and test
|
||||
runs-on: ubuntu-latest
|
||||
if: >
|
||||
(( github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login ) &&
|
||||
github.event_name == 'pull_request' ) || (github.event_name == 'push' && github.event.commits != '[]' )
|
||||
env:
|
||||
GO111MODULE: on
|
||||
TARGET: arm64
|
||||
steps:
|
||||
- name: Set up Go 1.13
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Build
|
||||
run: GOARCH="${TARGET}" ./build
|
Loading…
Reference in New Issue
Block a user