From 6825761d6f73e782a56bffcd7288086ea7f6f448 Mon Sep 17 00:00:00 2001 From: Yevheniy Oliynyk Date: Sat, 7 Dec 2024 18:50:37 +0100 Subject: [PATCH 1/5] feat: amd64 docker build --- .github/workflows/publish.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 57f7aed0..a809a63f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -199,14 +199,20 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Copy Dockerfile - run: | - cp packages/docker/Dockerfile Dockerfile + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 17 + cache: 'gradle' + + # to enable buildx (multiplatform build) + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - name: Build Docker image run: | docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" docker.io - docker build --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" . + docker buildx build --platform linux/amd64,linux/arm64/v8 --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" . docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" From 501e11de86645d01dcba6d6f276027271b592310 Mon Sep 17 00:00:00 2001 From: Yevheniy Oliynyk Date: Sat, 7 Dec 2024 18:52:23 +0100 Subject: [PATCH 2/5] fix --- .github/workflows/publish.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a809a63f..498eed46 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -199,11 +199,9 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: temurin - java-version: 17 - cache: 'gradle' + - name: Copy Dockerfile + run: | + cp packages/docker/Dockerfile Dockerfile # to enable buildx (multiplatform build) - uses: docker/setup-qemu-action@v3 From 089a1917f5684b942a23f5cda58599fba2d218c7 Mon Sep 17 00:00:00 2001 From: Yevheniy Oliynyk Date: Sat, 7 Dec 2024 18:55:17 +0100 Subject: [PATCH 3/5] fix --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 498eed46..dac8b94e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -210,7 +210,7 @@ jobs: - name: Build Docker image run: | docker login -u "${{ secrets.DOCKER_USERNAME }}" -p "${{ secrets.DOCKER_PASSWORD }}" docker.io - docker buildx build --platform linux/amd64,linux/arm64/v8 --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" . + docker buildx build --platform linux/amd64,linux/arm64 --pull -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" -t "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" . docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:${{ github.ref_name }}" docker push "${{ secrets.DOCKER_HUB_REGISTRY_IMAGE }}:latest" From 2dbe1dbe5e0cb976f15ec720574b1b4a271f20aa Mon Sep 17 00:00:00 2001 From: Yevheniy Oliynyk Date: Sat, 7 Dec 2024 19:04:56 +0100 Subject: [PATCH 4/5] docker build dryrun --- .github/workflows/build-test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 2dbb4361..255c5861 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -170,3 +170,21 @@ jobs: with: name: exe-package path: crowdin.exe + + build-docker: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v4 + + - name: Copy Dockerfile + run: | + cp packages/docker/Dockerfile Dockerfile + + # to enable buildx (multiplatform build) + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + + - name: Build Docker image + run: | + docker buildx build --platform linux/amd64,linux/arm64 -t "crowdin/cli:dryrun" . From daf9dedbc33f9a7901fb70f4c967758e9be6520c Mon Sep 17 00:00:00 2001 From: Yevheniy Oliynyk Date: Sat, 7 Dec 2024 19:11:27 +0100 Subject: [PATCH 5/5] revert --- .github/workflows/build-test.yml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 255c5861..2dbb4361 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -170,21 +170,3 @@ jobs: with: name: exe-package path: crowdin.exe - - build-docker: - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/checkout@v4 - - - name: Copy Dockerfile - run: | - cp packages/docker/Dockerfile Dockerfile - - # to enable buildx (multiplatform build) - - uses: docker/setup-qemu-action@v3 - - uses: docker/setup-buildx-action@v3 - - - name: Build Docker image - run: | - docker buildx build --platform linux/amd64,linux/arm64 -t "crowdin/cli:dryrun" .