ci: build multiplatform docker image
This commit is contained in:
		
							parent
							
								
									3a72617a0f
								
							
						
					
					
						commit
						e5b4ae581f
					
				
							
								
								
									
										27
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@ -4,9 +4,9 @@ on:
 | 
				
			|||||||
        branches:
 | 
					        branches:
 | 
				
			||||||
            - main
 | 
					            - main
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
    docker-amd64:
 | 
					    docker:
 | 
				
			||||||
        if: github.repository == 'OpenWF/SpaceNinjaServer'
 | 
					        if: github.repository == 'OpenWF/SpaceNinjaServer'
 | 
				
			||||||
        runs-on: amd64
 | 
					        runs-on: ubuntu-latest
 | 
				
			||||||
        steps:
 | 
					        steps:
 | 
				
			||||||
            - name: Set up Docker buildx
 | 
					            - name: Set up Docker buildx
 | 
				
			||||||
              uses: docker/setup-buildx-action@v3
 | 
					              uses: docker/setup-buildx-action@v3
 | 
				
			||||||
@ -18,27 +18,10 @@ jobs:
 | 
				
			|||||||
            - name: Build and push
 | 
					            - name: Build and push
 | 
				
			||||||
              uses: docker/build-push-action@v6
 | 
					              uses: docker/build-push-action@v6
 | 
				
			||||||
              with:
 | 
					              with:
 | 
				
			||||||
                  platforms: linux/amd64
 | 
					                  platforms: linux/arm64,linux/amd64
 | 
				
			||||||
                  push: true
 | 
					                  push: true
 | 
				
			||||||
                  tags: |
 | 
					                  tags: |
 | 
				
			||||||
                      openwf/spaceninjaserver:latest
 | 
					                      openwf/spaceninjaserver:latest
 | 
				
			||||||
                      openwf/spaceninjaserver:${{ github.sha }}
 | 
					 | 
				
			||||||
    docker-arm64:
 | 
					 | 
				
			||||||
        if: github.repository == 'OpenWF/SpaceNinjaServer'
 | 
					 | 
				
			||||||
        runs-on: arm64
 | 
					 | 
				
			||||||
        steps:
 | 
					 | 
				
			||||||
            - name: Set up Docker buildx
 | 
					 | 
				
			||||||
              uses: docker/setup-buildx-action@v3
 | 
					 | 
				
			||||||
            - name: Log in to container registry
 | 
					 | 
				
			||||||
              uses: docker/login-action@v3
 | 
					 | 
				
			||||||
              with:
 | 
					 | 
				
			||||||
                  username: openwf
 | 
					 | 
				
			||||||
                  password: ${{ secrets.DOCKERHUB_TOKEN }}
 | 
					 | 
				
			||||||
            - name: Build and push
 | 
					 | 
				
			||||||
              uses: docker/build-push-action@v6
 | 
					 | 
				
			||||||
              with:
 | 
					 | 
				
			||||||
                  platforms: linux/arm64
 | 
					 | 
				
			||||||
                  push: true
 | 
					 | 
				
			||||||
                  tags: |
 | 
					 | 
				
			||||||
                      openwf/spaceninjaserver:latest-arm64
 | 
					                      openwf/spaceninjaserver:latest-arm64
 | 
				
			||||||
                      openwf/spaceninjaserver:${{ github.sha }}-arm64
 | 
					                      openwf/spaceninjaserver:${{ github.sha }}
 | 
				
			||||||
 | 
					                      openwf/spaceninjaserver:${{ github.sha }}docker-arm64
 | 
				
			||||||
 | 
				
			|||||||
@ -1,6 +1,5 @@
 | 
				
			|||||||
services:
 | 
					services:
 | 
				
			||||||
    spaceninjaserver:
 | 
					    spaceninjaserver:
 | 
				
			||||||
        # The image to use. If you have an ARM CPU, replace 'latest' with 'latest-arm64'.
 | 
					 | 
				
			||||||
        image: openwf/spaceninjaserver:latest
 | 
					        image: openwf/spaceninjaserver:latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        volumes:
 | 
					        volumes:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user