fix ip is a substring in node name (#3832) #10716
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build arm64 Image | |
on: | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
push: | |
branches: | |
- master | |
- release-* | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
env: | |
GO_VERSION: '' | |
jobs: | |
build: | |
name: Build arm64 | |
runs-on: ubuntu-22.04 | |
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: | |
go-version: ${{ env.GO_VERSION || '' }} | |
go-version-file: go.mod | |
check-latest: true | |
cache: false | |
- name: Export Go full version | |
run: echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV" | |
- name: Go Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-${{ env.GO_FULL_VER }}-arm64-${{ hashFiles('**/go.sum') }} | |
restore-keys: ${{ runner.os }}-${{ env.GO_FULL_VER }}-arm64- | |
- name: Build | |
run: make release-arm || make release-arm | |
- name: Push | |
if: github.ref_name == github.event.repository.default_branch || startsWith(github.ref_name, 'release-') | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
COMMIT: ${{ github.sha }} | |
run: | | |
TAG=$(cat VERSION) | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn:$TAG-arm | |
docker tag kubeovn/kube-ovn:$TAG kubeovn/kube-ovn-dev:$COMMIT-arm | |
docker tag kubeovn/kube-ovn:$TAG-debug kubeovn/kube-ovn:$TAG-debug-arm | |
docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway:$TAG-arm | |
docker tag kubeovn/vpc-nat-gateway:$TAG kubeovn/vpc-nat-gateway-dev:$COMMIT-arm | |
docker images | |
docker push kubeovn/kube-ovn:$TAG-arm | |
docker push kubeovn/kube-ovn:$TAG-debug-arm | |
docker push kubeovn/kube-ovn-dev:$COMMIT-arm | |
docker push kubeovn/vpc-nat-gateway:$TAG-arm | |
docker push kubeovn/vpc-nat-gateway-dev:$COMMIT-arm |