extended github action with proper tags/labels
This commit is contained in:
		
							parent
							
								
									c6a9034be1
								
							
						
					
					
						commit
						3125c1b750
					
				| 
						 | 
				
			
			@ -4,6 +4,8 @@ on:
 | 
			
		|||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - 'main'
 | 
			
		||||
    tags:
 | 
			
		||||
      - 'v*'
 | 
			
		||||
  pull_request:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
| 
						 | 
				
			
			@ -16,8 +18,15 @@ jobs:
 | 
			
		|||
      - name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v1
 | 
			
		||||
 | 
			
		||||
      - name: Docker meta
 | 
			
		||||
        id: meta
 | 
			
		||||
        uses: docker/metadata-action@v3
 | 
			
		||||
        with:
 | 
			
		||||
          images: ghcr.io/${{ github.repository }}
 | 
			
		||||
 | 
			
		||||
      - name: Login to Github Packages
 | 
			
		||||
        uses: docker/login-action@v1
 | 
			
		||||
        if: github.event_name != 'pull_request'
 | 
			
		||||
        with:
 | 
			
		||||
          registry: ghcr.io
 | 
			
		||||
          username: ${{ github.actor }}
 | 
			
		||||
| 
						 | 
				
			
			@ -27,5 +36,7 @@ jobs:
 | 
			
		|||
        id: docker_build
 | 
			
		||||
        uses: docker/build-push-action@v2
 | 
			
		||||
        with:
 | 
			
		||||
          push: ${{ github.ref == 'refs/heads/main' }}
 | 
			
		||||
          tags: ghcr.io/chaoswest-tv/concierge:latest
 | 
			
		||||
          context: .
 | 
			
		||||
          push: ${{ github.event_name != 'pull_request'}}
 | 
			
		||||
          tags: ${{ steps.meta.outputs.tags }}
 | 
			
		||||
          labels: ${{ steps.meta.outputs.labels }}
 | 
			
		||||
		Loading…
	
		Reference in New Issue