From 5c666c0dd4f3b68e2c9cbf847fbc80e65f032d55 Mon Sep 17 00:00:00 2001 From: allburov Date: Mon, 4 Sep 2023 18:36:32 +0700 Subject: [PATCH] Use buildjet with arm --- .github/workflows/build.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7dfa6f3e..9ddad095 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -41,3 +41,38 @@ jobs: push: ${{ github.ref_type == 'tag' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + docker-arm: + runs-on: buildjet-4vcpu-ubuntu-2204-arm + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ${{ secrets.DOCKER_IMAGE }} + flavor: latest=false + tags: | + type=raw,value=arm + + - name: Login to image repository + if: github.ref_type == 'tag' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USER }} + password: ${{ secrets.DOCKER_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: Dockerfile + platforms: 'linux/arm64' + push: ${{ github.ref_type == 'tag' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}