mirror of
				https://github.com/9technologygroup/patchmon.net.git
				synced 2025-11-04 05:53:27 +00:00 
			
		
		
		
	Merge pull request #114 from PatchMon/ci/docker
This commit is contained in:
		
							
								
								
									
										18
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							@@ -33,24 +33,21 @@ jobs:
 | 
				
			|||||||
      - name: Checkout repository
 | 
					      - name: Checkout repository
 | 
				
			||||||
        uses: actions/checkout@v5
 | 
					        uses: actions/checkout@v5
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Set up Docker Buildx
 | 
					      - name: Log in to container registry
 | 
				
			||||||
        uses: docker/setup-buildx-action@v3
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Log in to Container Registry
 | 
					 | 
				
			||||||
        if: github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true'
 | 
					 | 
				
			||||||
        uses: docker/login-action@v3
 | 
					        uses: docker/login-action@v3
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          registry: ${{ env.REGISTRY }}
 | 
					          registry: ${{ env.REGISTRY }}
 | 
				
			||||||
          username: ${{ github.repository_owner }}
 | 
					          username: ${{ github.repository_owner }}
 | 
				
			||||||
          # Using PAT as a hack due to issues with GITHUB_TOKEN and package permissions
 | 
					          password: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
          # This should be reverted to use GITHUB_TOKEN once a solution is discovered.
 | 
					
 | 
				
			||||||
          password: ${{ secrets.GHCR_PAT }}
 | 
					      - name: Set up Docker Buildx
 | 
				
			||||||
 | 
					        uses: docker/setup-buildx-action@v3
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Extract metadata (tags, labels)
 | 
					      - name: Extract metadata (tags, labels)
 | 
				
			||||||
        id: meta
 | 
					        id: meta
 | 
				
			||||||
        uses: docker/metadata-action@v5
 | 
					        uses: docker/metadata-action@v5
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/patchmon-${{ matrix.image }}
 | 
					          images: ${{ env.REGISTRY }}/${{ github.repository }}-${{ matrix.image }}
 | 
				
			||||||
          tags: |
 | 
					          tags: |
 | 
				
			||||||
            type=ref,event=pr
 | 
					            type=ref,event=pr
 | 
				
			||||||
            type=semver,pattern={{version}}
 | 
					            type=semver,pattern={{version}}
 | 
				
			||||||
@@ -59,13 +56,12 @@ jobs:
 | 
				
			|||||||
            type=raw,value=latest,enable={{is_default_branch}}
 | 
					            type=raw,value=latest,enable={{is_default_branch}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Build and push ${{ matrix.image }} image
 | 
					      - name: Build and push ${{ matrix.image }} image
 | 
				
			||||||
        if: github.event_name != 'workflow_dispatch' || github.event_name == 'workflow_dispatch' && github.event.inputs.push == 'true'
 | 
					 | 
				
			||||||
        uses: docker/build-push-action@v6
 | 
					        uses: docker/build-push-action@v6
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          context: .
 | 
					          context: .
 | 
				
			||||||
          file: docker/${{ matrix.image }}.Dockerfile
 | 
					          file: docker/${{ matrix.image }}.Dockerfile
 | 
				
			||||||
          platforms: linux/amd64,linux/arm64
 | 
					          platforms: linux/amd64,linux/arm64
 | 
				
			||||||
          push: true
 | 
					          push: ${{ github.event_name != 'workflow_dispatch' || inputs.push == 'true' }}
 | 
				
			||||||
          tags: ${{ steps.meta.outputs.tags }}
 | 
					          tags: ${{ steps.meta.outputs.tags }}
 | 
				
			||||||
          labels: ${{ steps.meta.outputs.labels }}
 | 
					          labels: ${{ steps.meta.outputs.labels }}
 | 
				
			||||||
          cache-from: type=gha,scope=${{ matrix.image }}
 | 
					          cache-from: type=gha,scope=${{ matrix.image }}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user