new test pipe
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Homepage Build and Deploy / Deploy Homepage (push) Has been cancelled
				
			
		
			
				
	
				Homepage Build and Deploy / Build Homepage Image (push) Has been cancelled
				
			
		
			
				
	
				(Matrix) Homepage Build and Deploy / Build Homepage Image (arm64) (push) Failing after 8m17s
				
			
		
			
				
	
				(Matrix) Homepage Build and Deploy / Build Homepage Image (amd64) (push) Has been cancelled
				
			
		
			
				
	
				(Matrix) Homepage Build and Deploy / create-manifest (push) Has been cancelled
				
			
		
			
				
	
				(Matrix) Homepage Build and Deploy / Deploy Homepage (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Homepage Build and Deploy / Deploy Homepage (push) Has been cancelled
				
			Homepage Build and Deploy / Build Homepage Image (push) Has been cancelled
				
			(Matrix) Homepage Build and Deploy / Build Homepage Image (arm64) (push) Failing after 8m17s
				
			(Matrix) Homepage Build and Deploy / Build Homepage Image (amd64) (push) Has been cancelled
				
			(Matrix) Homepage Build and Deploy / create-manifest (push) Has been cancelled
				
			(Matrix) Homepage Build and Deploy / Deploy Homepage (push) Has been cancelled
				
			This commit is contained in:
		
							
								
								
									
										85
									
								
								.gitea/workflows/matrix.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								.gitea/workflows/matrix.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,85 @@
 | 
			
		||||
name: (Matrix) Homepage Build and Deploy
 | 
			
		||||
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
  workflow_dispatch:
 | 
			
		||||
 | 
			
		||||
env:
 | 
			
		||||
  REGISTRY_HOST: git.ivanch.me
 | 
			
		||||
  REGISTRY_USERNAME: ivanch
 | 
			
		||||
  IMAGE_NAME: ${{ env.REGISTRY_HOST }}/ivanch/mainpage
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    strategy:
 | 
			
		||||
      matrix:
 | 
			
		||||
        include:
 | 
			
		||||
          - platform: linux/amd64
 | 
			
		||||
            runner: ubuntu-slim
 | 
			
		||||
            arch: amd64
 | 
			
		||||
          - platform: linux/arm64
 | 
			
		||||
            runner: ubuntu-arm64  # Your ARM64 runner label
 | 
			
		||||
            arch: arm64
 | 
			
		||||
    runs-on: ${{ matrix.runner }}
 | 
			
		||||
    name: Build Homepage Image (${{ matrix.arch }})
 | 
			
		||||
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Check out repository
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
      - name: Log in to Container Registry
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "${{ secrets.REGISTRY_PASSWORD }}" \
 | 
			
		||||
            | docker login "${{ env.REGISTRY_HOST }}" \
 | 
			
		||||
                -u "${{ env.REGISTRY_USERNAME }}" \
 | 
			
		||||
                --password-stdin
 | 
			
		||||
 | 
			
		||||
      - name: Set up Docker Buildx
 | 
			
		||||
        uses: docker/setup-buildx-action@v3
 | 
			
		||||
 | 
			
		||||
      - name: Build and Push Multi-Arch Image
 | 
			
		||||
        uses: docker/build-push-action@v6
 | 
			
		||||
        with:
 | 
			
		||||
          push: true
 | 
			
		||||
          context: .
 | 
			
		||||
          platforms: ${{ matrix.platform }}
 | 
			
		||||
          tags: |
 | 
			
		||||
            ${{ env.IMAGE_NAME }}:${{ matrix.arch }}
 | 
			
		||||
          cache-from: type=gha
 | 
			
		||||
          cache-to: type=gha,mode=max
 | 
			
		||||
 | 
			
		||||
  create-manifest:
 | 
			
		||||
    needs: build
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Log in to Container Registry
 | 
			
		||||
        run: |
 | 
			
		||||
          echo "${{ secrets.REGISTRY_PASSWORD }}" \
 | 
			
		||||
            | docker login "${{ env.REGISTRY_HOST }}" \
 | 
			
		||||
                -u "${{ env.REGISTRY_USERNAME }}" \
 | 
			
		||||
                --password-stdin
 | 
			
		||||
      
 | 
			
		||||
      - name: Create and push manifest
 | 
			
		||||
        run: |
 | 
			
		||||
          docker manifest create ${{ env.IMAGE_NAME }}:latest \
 | 
			
		||||
            ${{ env.IMAGE_NAME }}:amd64 \
 | 
			
		||||
            ${{ env.IMAGE_NAME }}:arm64
 | 
			
		||||
          
 | 
			
		||||
          docker manifest push ${{ env.IMAGE_NAME }}:latest
 | 
			
		||||
 | 
			
		||||
  deploy_ivanch_me:
 | 
			
		||||
    name: Deploy Homepage
 | 
			
		||||
    runs-on: ubuntu-amd64
 | 
			
		||||
    needs: build_ivanch_me
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Recreate Container
 | 
			
		||||
        uses: appleboy/ssh-action@v0.1.7
 | 
			
		||||
        with:
 | 
			
		||||
          host: ${{ secrets.HOST }}
 | 
			
		||||
          username: ${{ secrets.USERNAME }}
 | 
			
		||||
          key: ${{ secrets.KEY }}
 | 
			
		||||
          port: ${{ secrets.PORT }}
 | 
			
		||||
          script: |
 | 
			
		||||
            cd ${{ secrets.DIR }}
 | 
			
		||||
            docker compose pull
 | 
			
		||||
            docker compose up -d --force-recreate
 | 
			
		||||
		Reference in New Issue
	
	Block a user