added dockerfile and workflow
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build and Push Docker Image / build-and-push (push) Failing after 33s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build and Push Docker Image / build-and-push (push) Failing after 33s
				
			This commit is contained in:
		
							parent
							
								
									9b0941a04a
								
							
						
					
					
						commit
						709464b5f7
					
				
							
								
								
									
										35
									
								
								.gitea/workflows/build.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								.gitea/workflows/build.yaml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,35 @@
 | 
				
			|||||||
 | 
					name: Build and Push Docker Image
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches: [ main ]
 | 
				
			||||||
 | 
					  pull_request:
 | 
				
			||||||
 | 
					    branches: [ main ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  REGISTRY: gitea.rannes.dev/rannes.dev
 | 
				
			||||||
 | 
					  IMAGE_NAME: ${{ github.repository }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  build-and-push:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
 | 
					    permissions:
 | 
				
			||||||
 | 
					      contents: read
 | 
				
			||||||
 | 
					      packages: write
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					    - uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # - name: Log in to GitHub Container Registry
 | 
				
			||||||
 | 
					    #   uses: docker/login-action@v3
 | 
				
			||||||
 | 
					    #   with:
 | 
				
			||||||
 | 
					    #     registry: ${{ env.REGISTRY }}
 | 
				
			||||||
 | 
					    #     username: ${{ github.actor }}
 | 
				
			||||||
 | 
					    #     password: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    - name: Build and push Docker image
 | 
				
			||||||
 | 
					      uses: docker/build-push-action@v5
 | 
				
			||||||
 | 
					      with:
 | 
				
			||||||
 | 
					        context: .
 | 
				
			||||||
 | 
					        push: true
 | 
				
			||||||
 | 
					        tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
 | 
				
			||||||
							
								
								
									
										11
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					FROM golang:1.21-alpine AS builder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					COPY . .
 | 
				
			||||||
 | 
					RUN go mod download
 | 
				
			||||||
 | 
					RUN CGO_ENABLED=0 GOOS=linux go build -o job-scraper
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FROM alpine:3.18
 | 
				
			||||||
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					COPY --from=builder /app/job-scraper .
 | 
				
			||||||
 | 
					CMD ["./job-scraper"]
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user