mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 01:46:28 +00:00 
			
		
		
		
	Add schedule to the CI
This commit is contained in:
		
							
								
								
									
										49
									
								
								.github/workflows/publish-docker-images.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								.github/workflows/publish-docker-images.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
---
 | 
			
		||||
on:
 | 
			
		||||
  schedule:
 | 
			
		||||
    - cron: '0 4 * * *' # Every day at 4:00am
 | 
			
		||||
  push:
 | 
			
		||||
    tags:
 | 
			
		||||
      - '*'
 | 
			
		||||
  release:
 | 
			
		||||
    types: [released]
 | 
			
		||||
 | 
			
		||||
name: Publish tagged images to Docker Hub
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  docker:
 | 
			
		||||
    runs-on: docker
 | 
			
		||||
    steps:
 | 
			
		||||
      - 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
 | 
			
		||||
        if: github.event_name != 'schedule'
 | 
			
		||||
        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
 | 
			
		||||
          # The lastest tag is only pushed for the official Meilisearch release
 | 
			
		||||
          # See https://github.com/docker/metadata-action#latest-tag
 | 
			
		||||
          flavor: latest=false
 | 
			
		||||
          tags: |
 | 
			
		||||
            type=ref,event=tag
 | 
			
		||||
            type=raw,value=latest,enable=${{ github.event_name == 'release' }}
 | 
			
		||||
 | 
			
		||||
      - name: Build and push
 | 
			
		||||
        id: docker_build
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          # 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 }}
 | 
			
		||||
		Reference in New Issue
	
	Block a user