From 7d59c5f2f689a0464d94dd0ff432be79199e3116 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Sun, 24 Dec 2023 12:31:58 +0100 Subject: [PATCH] Add arm/arm64 images --- .github/workflows/main.yml | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8d8449..33b48c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,17 +13,27 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - make: ["lint", "test"] + arch: + - arm64 + - arm + - amd64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: ${{ matrix.arch }} - name: install go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version-file: go.mod - - name: ${{ matrix.make }} - run: make ${{ matrix.make }} + - name: Run tests + run: | + uname -a + make test deploy: runs-on: ubuntu-latest @@ -31,16 +41,19 @@ jobs: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') strategy: matrix: - goosarch: [linux-amd64] + goosarch: + - linux/amd64 + - linux/arm/v7 + - linux/arm64 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: install go - uses: actions/setup-go@v3 + uses: actions/setup-go@v5 with: go-version-file: go.mod - cache: true - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV