mirror of
				https://github.com/ajnart/homarr.git
				synced 2025-10-31 02:25:57 +01:00 
			
		
		
		
	Trying a completely new Docker CI
This commit is contained in:
		
							
								
								
									
										56
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										56
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							| @@ -25,34 +25,50 @@ jobs: | |||||||
|           path: ./out/ |           path: ./out/ | ||||||
|           key: ${{ github.sha }} |           key: ${{ github.sha }} | ||||||
|  |  | ||||||
|   push: |   docker: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     needs: [build] |  | ||||||
|     permissions: |  | ||||||
|       packages: write |  | ||||||
|       contents: read |  | ||||||
|  |  | ||||||
|     steps: |     steps: | ||||||
|       - uses: actions/checkout@v3 |       - name: Checkout | ||||||
|       - uses: actions/cache@v2 |         uses: actions/checkout@v2 | ||||||
|         id: restore-build |       - name: Docker meta | ||||||
|  |         id: meta | ||||||
|  |         uses: docker/metadata-action@v4 | ||||||
|         with: |         with: | ||||||
|           path: ./out/ |           # list of Docker images to use as base name for tags | ||||||
|           key: ${{ github.sha }} |           images: | | ||||||
|  |             ajnart/mhp | ||||||
|  |             ghcr.io/ajnart/mhp | ||||||
|  |           # generate Docker tags based on the following events/attributes | ||||||
|  |           tags: | | ||||||
|  |             type=schedule | ||||||
|  |             type=ref,event=branch | ||||||
|  |             type=ref,event=pr | ||||||
|  |             type=semver,pattern={{version}} | ||||||
|  |             type=semver,pattern={{major}}.{{minor}} | ||||||
|  |             type=semver,pattern={{major}} | ||||||
|  |             type=sha | ||||||
|       - name: Set up QEMU |       - name: Set up QEMU | ||||||
|         uses: docker/setup-qemu-action@v2 |         uses: docker/setup-qemu-action@v2 | ||||||
|  |  | ||||||
|       - name: Set up Docker Buildx |       - name: Set up Docker Buildx | ||||||
|         uses: docker/setup-buildx-action@v2 |         uses: docker/setup-buildx-action@v2 | ||||||
|  |       - name: Login to DockerHub | ||||||
|       - name: Log in to registry |         if: github.event_name != 'pull_request' | ||||||
|         run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin |         uses: docker/login-action@v2 | ||||||
|  |         with: | ||||||
|  |           username: ${{ secrets.DOCKERHUB_USERNAME }} | ||||||
|  |           password: ${{ secrets.DOCKERHUB_TOKEN }} | ||||||
|  |       - name: Login to GHCR | ||||||
|  |         if: github.event_name != 'pull_request' | ||||||
|  |         uses: docker/login-action@v2 | ||||||
|  |         with: | ||||||
|  |           registry: ghcr.io | ||||||
|  |           username: ${{ github.repository_owner }} | ||||||
|  |           password: ${{ secrets.GITHUB_TOKEN }} | ||||||
|       - name: Build and push |       - name: Build and push | ||||||
|         uses: docker/build-push-action@v3 |         uses: docker/build-push-action@v3 | ||||||
|         with: |         with: | ||||||
|           context: . |  | ||||||
|           platforms: linux/amd64,linux/arm64,linux/arm/v7 |           platforms: linux/amd64,linux/arm64,linux/arm/v7 | ||||||
|           push: true |           context: . | ||||||
|           tags: [ghcr.io/ajnart/mhp:latest, ghcr.io/ajnart/mhp:${{ github.ref }}] |           push: ${{ github.event_name != 'pull_request' }} | ||||||
|  |           tags: ${{ steps.meta.outputs.tags }} | ||||||
|  |           labels: ${{ steps.meta.outputs.labels }} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user