Add publishing workflow
This commit is contained in:
		
							parent
							
								
									55643affd4
								
							
						
					
					
						commit
						09205a57ed
					
				
							
								
								
									
										44
									
								
								.github/workflows/publish.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								.github/workflows/publish.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,44 @@
 | 
				
			|||||||
 | 
					on:
 | 
				
			||||||
 | 
					  workflow_dispatch:
 | 
				
			||||||
 | 
					    inputs:
 | 
				
			||||||
 | 
					      container_tag:
 | 
				
			||||||
 | 
					        description: Tag for container
 | 
				
			||||||
 | 
					        default: "latest"
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  push:
 | 
				
			||||||
 | 
					    branches:
 | 
				
			||||||
 | 
					      - main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  schedule:
 | 
				
			||||||
 | 
					    - cron: '0 0 12 1/1 *'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					name: Publish container
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					env:
 | 
				
			||||||
 | 
					  CONTAINER_NAME: jordemort/pleroma:${{ github.event.inputs.container_tag || 'latest' }}
 | 
				
			||||||
 | 
					  DOCKER_CLI_EXPERIMENTAL: enabled
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  publish:
 | 
				
			||||||
 | 
					    name: Build and publish image
 | 
				
			||||||
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Set up QEMU
 | 
				
			||||||
 | 
					        uses: docker/setup-qemu-action@v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Set up Docker Buildx
 | 
				
			||||||
 | 
					        id: buildx
 | 
				
			||||||
 | 
					        uses: docker/setup-buildx-action@v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Login to container registry
 | 
				
			||||||
 | 
					        uses: docker/login-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          username: ${{ secrets.REGISTRY_USERNAME }}
 | 
				
			||||||
 | 
					          password: ${{ secrets.REGISTRY_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Build and push container
 | 
				
			||||||
 | 
					        run: docker buildx build --push --pull --platform "linux/amd64,linux/arm64,linux/arm/v7" --cache-from "$CONTAINER_NAME" --tag "$CONTAINER_NAME" .
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user