mirror of
				https://github.com/qurator-spk/sbb_binarization.git
				synced 2025-10-31 01:24:14 +01:00 
			
		
		
		
	add GHA CD via Dockerhub
This commit is contained in:
		
							parent
							
								
									978f425bd1
								
							
						
					
					
						commit
						23e282ce8c
					
				
					 4 changed files with 97 additions and 8 deletions
				
			
		
							
								
								
									
										47
									
								
								.github/workflows/docker-image.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								.github/workflows/docker-image.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,47 @@ | |||
| name: Docker Image CD | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     branches: [ "master" ] | ||||
|   workflow_dispatch: | ||||
|     inputs: | ||||
|       docker-tagname: | ||||
|         description: Tag name of the Docker image | ||||
|         default: 'ocrd/sbb_binarization' | ||||
| 
 | ||||
| env: | ||||
|   DOCKER_TAGNAME: ${{ github.evenv.inputs.docker-tagname || 'ocrd/sbb_binarization' }} | ||||
| 
 | ||||
| jobs: | ||||
| 
 | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
|     permissions: | ||||
|       packages: write | ||||
|       contents: read | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v4 | ||||
|     - # Activate cache export feature to reduce build time of image | ||||
|       name: Set up Docker Buildx | ||||
|       uses: docker/setup-buildx-action@v2 | ||||
|     - name: Build the Docker image | ||||
|       run: make docker DOCKER_TAG=${{ env.DOCKER_TAGNAME }} | ||||
|     - name: Login to Dockerhub | ||||
|       uses: docker/login-action@v2 | ||||
|       with: | ||||
|         username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||
|         password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||||
|     - name: Push image to Dockerhub | ||||
|       run: docker push ${{ env.DOCKER_TAGNAME }} | ||||
|     - name: Alias the Docker image for GHCR | ||||
|       run: docker tag ${{ env.DOCKER_TAGNAME }} ghcr.io/${{ github.repository }} | ||||
|     - name: Login to GitHub Container Registry | ||||
|       uses: docker/login-action@v2 | ||||
|       with: | ||||
|         registry: ghcr.io | ||||
|         username: ${{ github.actor }} | ||||
|         password: ${{ secrets.GITHUB_TOKEN }} | ||||
|     - name: Push image to Github Container Registry | ||||
|       run: docker push ghcr.io/${{ github.repository }} | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue