mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-10-31 18:16:00 +08:00 
			
		
		
		
	feature (arch): multi arch build
This commit is contained in:
		
							
								
								
									
										46
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										46
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @ -168,7 +168,24 @@ jobs: | ||||
|         node servers/webdav.js > /dev/null & | ||||
|         npm test | ||||
|  | ||||
|   release_docker: | ||||
|   release_docker_amd64: | ||||
|     if: github.ref == 'refs/heads/master' | ||||
|     needs: [ test_e2e, test_backend, test_frontend ] | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - name: Init | ||||
|       uses: actions/checkout@v3 | ||||
|     - name: Setup | ||||
|       uses: docker/login-action@v2 | ||||
|       with: | ||||
|         username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|         password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|     - name: Run | ||||
|       run: | | ||||
|         docker build -t machines/filestash:latest-amd64 ./docker/ | ||||
|         docker push machines/filestash:latest-amd64 | ||||
|  | ||||
|   release_docker_arm64: | ||||
|     if: github.ref == 'refs/heads/master' | ||||
|     needs: [ test_e2e, test_backend, test_frontend ] | ||||
|     runs-on: ubuntu-latest | ||||
| @ -186,10 +203,29 @@ jobs: | ||||
|       uses: docker/setup-buildx-action@v2 | ||||
|     - name: Run | ||||
|       run: | | ||||
|         export COMMIT_SHA=`git rev-parse --short HEAD` | ||||
|         docker buildx build --platform linux/arm/v7,linux/arm64,linux/amd64 \ | ||||
|           -t machines/filestash:latest -t machines/filestash:$COMMIT_SHA \ | ||||
|           --push ./docker/ | ||||
|         uname -m | ||||
|         uname -a | ||||
|         docker version | ||||
|         # docker build -t machines/filestash:latest-arm64 ./docker/ | ||||
|         # echo "DONE" | ||||
|  | ||||
|   release_docker: | ||||
|     needs: [ release_docker_amd64, release_docker_arm64 ] | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - name: Init | ||||
|       uses: actions/checkout@v3 | ||||
|     - name: Setup | ||||
|       uses: docker/login-action@v2 | ||||
|       with: | ||||
|         username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|         password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||
|     - name: Run | ||||
|       run: | | ||||
|         docker manifest create machines/filestash:latest \ | ||||
|           --amend machines/filestash:latest-amd64 \ | ||||
|           --amend machines/filestash:latest-arm64v8 | ||||
|         docker manifest push machines/filestash:latest | ||||
|  | ||||
|   deploy: | ||||
|     if: github.ref == 'refs/heads/master' | ||||
|  | ||||
| @ -9,7 +9,7 @@ FROM node:18-alpine AS builder_frontend | ||||
| WORKDIR /home/ | ||||
| COPY --from=builder_prepare /home/filestash/ ./ | ||||
| RUN apk add make git && \ | ||||
|     npm install --silent --legacy-peer-deps && \ | ||||
|     npm install --legacy-peer-deps && \ | ||||
|     make build_frontend | ||||
|  | ||||
| # STEP3: BUILD THE BACKEND | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Mickael Kerjean
					Mickael Kerjean