mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	Automated multi-platform build and DockerHub publication (#8)
* Automated multi-arch build This setup uses GitHub Actions to build an image for arm/v7 and arm64 then publish them on DockerHub (you need to setup repo secrets first) every time you want (workflow_dispatch), every push, every pull requests (pull_requests), or on a schedule (cronjob) :) Remove the triggers you don't want. Reminder: if you ever move the Dockerfile (or some dependencies), you will have to correct the Dockerfile path (and/or the context path). * Create dependabot.yml This checks the dependencies' versions for the Actions everyday and creates a pull request if there are new versions available.
This commit is contained in:
		
							
								
								
									
										7
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								.github/dependabot.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
				
			|||||||
 | 
					version: 2
 | 
				
			||||||
 | 
					updates:
 | 
				
			||||||
 | 
					  # Maintain dependencies for GitHub Actions
 | 
				
			||||||
 | 
					  - package-ecosystem: "github-actions"
 | 
				
			||||||
 | 
					    directory: "/"
 | 
				
			||||||
 | 
					    schedule:
 | 
				
			||||||
 | 
					      interval: "daily"
 | 
				
			||||||
							
								
								
									
										46
									
								
								.github/workflows/Build+push Immich.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								.github/workflows/Build+push Immich.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					name: Build+push Immich
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  # Triggers the workflow on push or pull request events but only for the main branch
 | 
				
			||||||
 | 
					  #schedule:
 | 
				
			||||||
 | 
					    # * is a special character in YAML so you have to quote this string
 | 
				
			||||||
 | 
					    #- cron:  '0 0 * * *'
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: [ main ]
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    branches: [ main ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  buildandpush:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout
 | 
				
			||||||
 | 
					        uses: actions/checkout@v2.4.0
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          ref: 'main' # branch
 | 
				
			||||||
 | 
					      # https://github.com/docker/setup-qemu-action#usage
 | 
				
			||||||
 | 
					      - name: Set up QEMU
 | 
				
			||||||
 | 
					        uses: docker/setup-qemu-action@v1.2.0
 | 
				
			||||||
 | 
					      # https://github.com/marketplace/actions/docker-setup-buildx
 | 
				
			||||||
 | 
					      - name: Set up Docker Buildx
 | 
				
			||||||
 | 
					        id: buildx
 | 
				
			||||||
 | 
					        uses: docker/setup-buildx-action@v1.6.0
 | 
				
			||||||
 | 
					      # https://github.com/docker/login-action#docker-hub
 | 
				
			||||||
 | 
					      - name: Login to Docker Hub
 | 
				
			||||||
 | 
					        uses: docker/login-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
				
			||||||
 | 
					          password: ${{ secrets.DOCKERHUB_TOKEN }}
 | 
				
			||||||
 | 
					      # https://github.com/docker/build-push-action#multi-platform-image
 | 
				
			||||||
 | 
					      - name: Build and push Immich
 | 
				
			||||||
 | 
					        uses: docker/build-push-action@v2.9.0
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          context: ./server
 | 
				
			||||||
 | 
					          file: ./server/Dockerfile
 | 
				
			||||||
 | 
					          #platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
 | 
				
			||||||
 | 
					          platforms: linux/arm/v7,linux/arm64
 | 
				
			||||||
 | 
					          pull: true
 | 
				
			||||||
 | 
					          push: true
 | 
				
			||||||
 | 
					          tags: |
 | 
				
			||||||
 | 
					            alextran1502/immich:latest
 | 
				
			||||||
		Reference in New Issue
	
	Block a user