From cffc39ba2c8a3f3f869e314e31a9df0b922d3070 Mon Sep 17 00:00:00 2001 From: Eguo Wang Date: Mon, 15 Jan 2024 19:53:21 +0800 Subject: [PATCH] chore: accelerate docker workflow with cirun --- .cirun.yml | 17 +++++++++++++++++ .github/workflows/docker.yml | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 .cirun.yml diff --git a/.cirun.yml b/.cirun.yml new file mode 100644 index 0000000..45ef01e --- /dev/null +++ b/.cirun.yml @@ -0,0 +1,17 @@ +runners: + - name: "aws-amd64-runner" + cloud: "aws" + instance_type: "t2.xlarge" + machine_image: "ami-0c7217cdde317cfec" + region: "us-east-1" + preemptible: false + labels: + - "cirun-aws-amd64" + - name: "aws-arm64-runner" + cloud: "aws" + instance_type: "t4g.xlarge" + machine_image: "ami-05d47d29a4c2d19e1" + region: "us-east-1" + preemptible: false + labels: + - "cirun-aws-arm64" diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d644b95..349a213 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -13,11 +13,11 @@ permissions: jobs: build: name: Build Image - runs-on: "cirun-aws-t2-large-ubuntu2204--${{ github.run_id }}" + runs-on: "cirun-aws-${{ matrix.platform }}--${{ github.run_id }}" strategy: fail-fast: false matrix: - platform: [linux/amd64, linux/arm64] + platform: [amd64, arm64] bin: [amp-apiserver, amp-controllers, amp-syncer] include: - bin: amp-apiserver @@ -55,7 +55,7 @@ jobs: with: context: . file: ${{ matrix.dockerfile }} - platforms: ${{ matrix.platform }} + platforms: linux/${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true provenance: false