From 4a494ad2fa899c00ffafe1e889975a2a85a86ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mentine=20Urquizar?= Date: Thu, 9 Jun 2022 11:50:20 +0200 Subject: [PATCH] Add schedule to the CI --- .../{publish-docker.yml => publish-docker-images.yml} | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) rename .github/workflows/{publish-docker.yml => publish-docker-images.yml} (73%) diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker-images.yml similarity index 73% rename from .github/workflows/publish-docker.yml rename to .github/workflows/publish-docker-images.yml index 7ec91ab4d..b9ea50cb3 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker-images.yml @@ -1,12 +1,14 @@ --- on: + schedule: + - cron: '0 4 * * *' # Every day at 4:00am push: tags: - '*' release: types: [released] -name: Publish tagged image to Docker Hub +name: Publish tagged images to Docker Hub jobs: docker: @@ -19,6 +21,7 @@ jobs: uses: docker/setup-buildx-action@v1 - name: Login to DockerHub + if: github.event_name != 'schedule' uses: docker/login-action@v1 with: username: ${{ secrets.DOCKER_USERNAME }} @@ -29,7 +32,7 @@ jobs: uses: docker/metadata-action@v3 with: images: getmeili/meilisearch - # Output 'latest' tag only when 'release' happen, instead of when 'push tag' event happend (default behavior). + # The lastest tag is only pushed for the official Meilisearch release # See https://github.com/docker/metadata-action#latest-tag flavor: latest=false tags: | @@ -40,6 +43,7 @@ jobs: id: docker_build uses: docker/build-push-action@v2 with: - push: true + # We do not push tags for the cron jobs, this is only for test purposes + push: ${{ github.event_name != 'schedule' }} platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }}