mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Changes to docker workflow
This commit is contained in:
		
							
								
								
									
										29
									
								
								.github/workflows/docker_build.yaml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										29
									
								
								.github/workflows/docker_build.yaml
									
									
									
									
										vendored
									
									
								
							@@ -1,8 +1,11 @@
 | 
				
			|||||||
# Test that the docker file builds correctly
 | 
					# Build and push latest docker image on push to master branch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
name: Docker
 | 
					name: Docker Build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
on: ["push", "pull_request"]
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - 'master'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
@@ -10,7 +13,19 @@ jobs:
 | 
				
			|||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v2
 | 
					      - name: Checkout Code
 | 
				
			||||||
      - name: Build Docker Image
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
        run: cd docker && docker build . --tag inventree:$(date +%s)
 | 
					      - name: Login to Dockerhub
 | 
				
			||||||
      
 | 
					        uses: docker/login-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          username: ${{ secrets.DOCKER_USERNAME }}
 | 
				
			||||||
 | 
					          password: ${{ secrets.DOCKER_PASSWORD }}
 | 
				
			||||||
 | 
					      - name: Build and Push
 | 
				
			||||||
 | 
					        uses: docker/build-push-action@v2
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          context: ./docker
 | 
				
			||||||
 | 
					          push: true
 | 
				
			||||||
 | 
					          repository: inventree/inventree
 | 
				
			||||||
 | 
					          tags: inventree/inventree:latest
 | 
				
			||||||
 | 
					      - name: Image Digest
 | 
				
			||||||
 | 
					        run: echo ${{ steps.docker_build.outputs.digest }}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user