Skip to content

Commit

Permalink
ci: build arm64 images on arm64 hosted runners (#4936)
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Jan 17, 2025
1 parent 6b8e67c commit a8fde89
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build-arm64-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,10 @@ env:
jobs:
build:
name: Build arm64
runs-on: ubuntu-22.04
runs-on: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -70,7 +67,6 @@ jobs:
- name: Build kubectl and CNI plugins from source
env:
CGO_ENABLED: "0"
GOARCH: arm64
GO_INSTALL: "go install -v -mod=mod -trimpath"
run: |
cat trivy-result.json
Expand All @@ -79,7 +75,7 @@ jobs:
cni_plugins_build_flags="-ldflags '-extldflags -static -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=$cni_plugins_version'"
jq -r '.Results[] | select((.Type=="gobinary") and (.Vulnerabilities!=null)) | .Target' trivy-result.json | while read f; do
bin=`basename $f`
go_bin_dir=`go env GOPATH`/bin/linux_arm64
go_bin_dir=`go env GOPATH`/bin
case $bin in
loopback|macvlan)
echo "Building $bin@$cni_plugins_version from source..."
Expand Down

0 comments on commit a8fde89

Please sign in to comment.