From 9ab17588a0f77478c59261f096ce30f0ef469069 Mon Sep 17 00:00:00 2001 From: barnettZQG Date: Wed, 12 Apr 2023 18:40:39 +0800 Subject: [PATCH] Chore: Add a workflow to test building arm64 image Signed-off-by: barnettZQG --- .github/workflows/arm64-build-test.yml | 64 ++++++++++++++++++++++++++ .github/workflows/server-test.yml | 18 +------- 2 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/arm64-build-test.yml diff --git a/.github/workflows/arm64-build-test.yml b/.github/workflows/arm64-build-test.yml new file mode 100644 index 000000000..42f9fdda0 --- /dev/null +++ b/.github/workflows/arm64-build-test.yml @@ -0,0 +1,64 @@ +name: Arm64 Build Test + +on: + push: + branches: + - main + - release-* + tags: + - v* + workflow_dispatch: { } + pull_request: + branches: + - main + - release-* + +env: + # Common versions + GO_VERSION: '1.19' + +permissions: + contents: read + +jobs: + + detect-noop: + runs-on: ubuntu-20.04 + outputs: + noop: ${{ steps.noop.outputs.should_skip }} + steps: + - name: Detect No-op Changes + id: noop + uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]' + do_not_skip: '["workflow_dispatch", "schedule", "push"]' + continue-on-error: true + + arm64-build-test: + runs-on: ubuntu-20.04 + needs: detect-noop + if: needs.detect-noop.outputs.noop != 'true' + + steps: + + - name: Check out code into the Go module directory + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + with: + submodules: true + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build linux/arm64 image + id: docker_build_2 + uses: docker/build-push-action@v2 + with: + context: ./ + build-args: | + GOPROXY=https://proxy.golang.org + file: ./Dockerfile + platforms: linux/arm64 + push: false + tags: oamdev/velaux:latest diff --git a/.github/workflows/server-test.yml b/.github/workflows/server-test.yml index 48decb9cb..ed28a89b3 100644 --- a/.github/workflows/server-test.yml +++ b/.github/workflows/server-test.yml @@ -187,20 +187,4 @@ jobs: name: codecov-umbrella - name: Clean e2e profile - run: rm /tmp/e2e_apiserver_test.out - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build linux/arm64 image - id: docker_build_2 - uses: docker/build-push-action@v2 - with: - context: ./ - build-args: | - GOPROXY=https://proxy.golang.org - file: ./Dockerfile - platforms: linux/arm64 - push: false - tags: oamdev/velaux:latest + run: rm /tmp/e2e_apiserver_test.out \ No newline at end of file