From 5fd9616b5f4b87392f5e16eed9159be060f3c6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 15:57:06 +0100 Subject: [PATCH 01/10] Add ARM image for Docker to CI --- .github/workflows/publish-docker-latest.yml | 31 ++++++++++------- .github/workflows/publish-docker-tag.yml | 38 +++++++++++++++------ 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 967248a07..4fdeed165 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -6,17 +6,24 @@ on: name: Publish latest image to Docker Hub jobs: - build: - runs-on: ubuntu-18.04 + docker-latest: + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Check if current release is latest - run: echo "##[set-output name=is_latest;]$(sh .github/is-latest-release.sh)" - id: release - - name: Publish to Registry - if: steps.release.outputs.is_latest == 'true' - uses: elgohr/Publish-Docker-Github-Action@master + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 with: - name: getmeili/meilisearch - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: getmeili/meilisearch:latest diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index 559a84f31..6901b46c9 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -7,16 +7,32 @@ on: name: Publish tagged image to Docker Hub jobs: - build: - runs-on: ubuntu-18.04 + docker-tag: + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - env: - COMMIT_SHA: ${{ github.sha }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 with: - name: getmeili/meilisearch - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tag_names: true + images: name/app + flavor: latest=false + tags: type=ref,event=tag + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: ${{ steps.meta.outputs.tags }} From 5e6d7b76491fdd2e8d7a24f38b640090f014dbc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 16:00:10 +0100 Subject: [PATCH 02/10] Add worflow dispatch event --- .github/workflows/publish-docker-latest.yml | 1 + .github/workflows/publish-docker-tag.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 4fdeed165..e2647897e 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -2,6 +2,7 @@ on: release: types: [released] + workflow_dispatch: name: Publish latest image to Docker Hub diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index 6901b46c9..9f3bf54cf 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -3,6 +3,7 @@ on: push: tags: - '*' + workflow_dispatch: name: Publish tagged image to Docker Hub From 11ef64ee43bbe60e3ba6078e39ffad8191562733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 16:02:32 +0100 Subject: [PATCH 03/10] Fix credentials --- .github/workflows/publish-docker-latest.yml | 4 ++-- .github/workflows/publish-docker-tag.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index e2647897e..ffa96bcd9 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -19,8 +19,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index 9f3bf54cf..412648f74 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -28,8 +28,8 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v1 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push id: docker_build From ded7922be598d2fe1dd17740c60d2135ac9d9021 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 16:28:30 +0100 Subject: [PATCH 04/10] Add context and platform --- .github/workflows/publish-docker-latest.yml | 2 ++ .github/workflows/publish-docker-tag.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index ffa96bcd9..2773771e3 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -26,5 +26,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: + context: . push: true + platforms: linux/amd64,linux/arm64 tags: getmeili/meilisearch:latest diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index 412648f74..b6b3f0779 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -35,5 +35,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: + context: . push: true + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} From 40e87b9544c7b2d5ff13674d6f269baa8f61f1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 16:37:01 +0100 Subject: [PATCH 05/10] Add checkout --- .github/workflows/publish-docker-latest.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 2773771e3..342dee8bf 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -10,6 +10,9 @@ jobs: docker-latest: runs-on: ubuntu-20.04 steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up QEMU uses: docker/setup-qemu-action@v1 From 3b1b9a277b6be6f2e964966833f278ed9fcf2e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 16:38:45 +0100 Subject: [PATCH 06/10] Remove context --- .github/workflows/publish-docker-latest.yml | 1 - .github/workflows/publish-docker-tag.yml | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 342dee8bf..52345b198 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -29,7 +29,6 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - context: . push: true platforms: linux/amd64,linux/arm64 tags: getmeili/meilisearch:latest diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index b6b3f0779..eabeff25a 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -11,6 +11,9 @@ jobs: docker-tag: runs-on: ubuntu-20.04 steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -35,7 +38,6 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - context: . push: true platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} From 9d75fbc619238bbfa9878a56f4fc2dbf23ccf432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 11 Nov 2021 19:42:30 +0100 Subject: [PATCH 07/10] Fix docker meta job --- .github/workflows/publish-docker-tag.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index eabeff25a..01c6a6db9 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -20,20 +20,20 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - images: name/app - flavor: latest=false - tags: type=ref,event=tag - - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: getmeili/meilisearch + flavor: latest=false + tags: type=ref,event=tag + - name: Build and push id: docker_build uses: docker/build-push-action@v2 From 2cf7daa2275a0dd7fa121eaee00a817a9fcae18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Fri, 12 Nov 2021 17:45:31 +0100 Subject: [PATCH 08/10] Use self-hosted runner --- .github/workflows/publish-docker-latest.yml | 2 +- .github/workflows/publish-docker-tag.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 52345b198..1066f0430 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -8,7 +8,7 @@ name: Publish latest image to Docker Hub jobs: docker-latest: - runs-on: ubuntu-20.04 + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index 01c6a6db9..50dcb501f 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -9,7 +9,7 @@ name: Publish tagged image to Docker Hub jobs: docker-tag: - runs-on: ubuntu-20.04 + runs-on: self-hosted steps: - name: Checkout uses: actions/checkout@v2 From f081dc20017c1199d4e1085122b175af1d0b5531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Fri, 12 Nov 2021 21:31:11 +0100 Subject: [PATCH 09/10] Remove checkout --- .github/workflows/publish-docker-latest.yml | 3 --- .github/workflows/publish-docker-tag.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 1066f0430..9ceaf8231 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -10,9 +10,6 @@ jobs: docker-latest: runs-on: self-hosted steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU uses: docker/setup-qemu-action@v1 diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index 50dcb501f..caaab6d63 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -11,9 +11,6 @@ jobs: docker-tag: runs-on: self-hosted steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Set up QEMU uses: docker/setup-qemu-action@v1 From b7c5b78a614b7e65d8a1f5c697449e8a9360e2b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Mon, 15 Nov 2021 14:13:40 +0100 Subject: [PATCH 10/10] Remove workflow_dispatch --- .github/workflows/publish-docker-latest.yml | 1 - .github/workflows/publish-docker-tag.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/publish-docker-latest.yml b/.github/workflows/publish-docker-latest.yml index 9ceaf8231..e88bed39d 100644 --- a/.github/workflows/publish-docker-latest.yml +++ b/.github/workflows/publish-docker-latest.yml @@ -2,7 +2,6 @@ on: release: types: [released] - workflow_dispatch: name: Publish latest image to Docker Hub diff --git a/.github/workflows/publish-docker-tag.yml b/.github/workflows/publish-docker-tag.yml index caaab6d63..05ecb5c58 100644 --- a/.github/workflows/publish-docker-tag.yml +++ b/.github/workflows/publish-docker-tag.yml @@ -3,7 +3,6 @@ on: push: tags: - '*' - workflow_dispatch: name: Publish tagged image to Docker Hub