diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c105e80..78eb144 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,8 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.16 + + # basics - name: Compile the binary run: | make bin/goldpinger @@ -22,3 +24,30 @@ jobs: - name: Build the Docker image run: | make build + + # multi-arch build + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and + id: docker_build + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + build-args: GO_MOD_ACTION=download + platforms: linux/amd64,linux/arm64 + target: simple + - name: Build and push vendor + id: docker_build_vendor + uses: docker/build-push-action@v2 + with: + context: . + flavor: | + suffix: -vendor,onlatest=false + file: ./Dockerfile + build-args: GO_MOD_ACTION=vendor + platforms: linux/amd64,linux/arm64 + target: vendor