Merge #1897
1897: Add ARM image for Docker to CI r=irevoire a=curquiza Fixes #1315 - [x] Publish MeiliSearch's docker image for `arm64` - [x] Add `workflow_dispatch` event in case we need to re-trigger it after a failure without creating a new release - [x] Use our own server to run the github runner since this CI is really slow (1h instead of 4h) - [x] Open an issue for a refactor by merging both files in one file (https://github.com/meilisearch/MeiliSearch/issues/1901) Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
This commit is contained in:
commit
53fc2edab3
|
@ -6,17 +6,25 @@ on:
|
||||||
name: Publish latest image to Docker Hub
|
name: Publish latest image to Docker Hub
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
docker-latest:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Set up QEMU
|
||||||
- name: Check if current release is latest
|
uses: docker/setup-qemu-action@v1
|
||||||
run: echo "##[set-output name=is_latest;]$(sh .github/is-latest-release.sh)"
|
|
||||||
id: release
|
- name: Set up Docker Buildx
|
||||||
- name: Publish to Registry
|
uses: docker/setup-buildx-action@v1
|
||||||
if: steps.release.outputs.is_latest == 'true'
|
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
name: getmeili/meilisearch
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: getmeili/meilisearch:latest
|
||||||
|
|
|
@ -7,16 +7,33 @@ on:
|
||||||
name: Publish tagged image to Docker Hub
|
name: Publish tagged image to Docker Hub
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
docker-tag:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Set up QEMU
|
||||||
- name: Publish to Registry
|
uses: docker/setup-qemu-action@v1
|
||||||
uses: elgohr/Publish-Docker-Github-Action@master
|
|
||||||
env:
|
- name: Set up Docker Buildx
|
||||||
COMMIT_SHA: ${{ github.sha }}
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
with:
|
with:
|
||||||
name: getmeili/meilisearch
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
tag_names: true
|
|
||||||
|
- 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
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|
Loading…
Reference in New Issue