mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	Merge pull request #1083 from crazy-max/e2e-workflow
ci: enhance e2e workflow
This commit is contained in:
		
							
								
								
									
										45
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										45
									
								
								.github/workflows/e2e.yml
									
									
									
									
										vendored
									
									
								
							@@ -12,8 +12,40 @@ on:
 | 
				
			|||||||
      - 'v[0-9]*'
 | 
					      - 'v[0-9]*'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
 | 
					  build:
 | 
				
			||||||
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
 | 
					    env:
 | 
				
			||||||
 | 
					      BIN_OUT: ./bin
 | 
				
			||||||
 | 
					    steps:
 | 
				
			||||||
 | 
					      - name: Checkout
 | 
				
			||||||
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					      -
 | 
				
			||||||
 | 
					        name: Set up Docker Buildx
 | 
				
			||||||
 | 
					        uses: docker/setup-buildx-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          version: latest
 | 
				
			||||||
 | 
					      -
 | 
				
			||||||
 | 
					        name: Build
 | 
				
			||||||
 | 
					        uses: docker/bake-action@v1
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          targets: binaries
 | 
				
			||||||
 | 
					      -
 | 
				
			||||||
 | 
					        name: Rename binary
 | 
				
			||||||
 | 
					        run: |
 | 
				
			||||||
 | 
					          mv ${{ env.BIN_OUT }}/buildx ${{ env.BIN_OUT }}/docker-buildx
 | 
				
			||||||
 | 
					      -
 | 
				
			||||||
 | 
					        name: Upload artifacts
 | 
				
			||||||
 | 
					        uses: actions/upload-artifact@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          name: binary
 | 
				
			||||||
 | 
					          path: ${{ env.BIN_OUT }}
 | 
				
			||||||
 | 
					          if-no-files-found: error
 | 
				
			||||||
 | 
					          retention-days: 7
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  driver:
 | 
					  driver:
 | 
				
			||||||
    runs-on: ubuntu-20.04
 | 
					    runs-on: ubuntu-20.04
 | 
				
			||||||
 | 
					    needs:
 | 
				
			||||||
 | 
					      - build
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      fail-fast: false
 | 
					      fail-fast: false
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
@@ -51,15 +83,16 @@ jobs:
 | 
				
			|||||||
        name: Set up QEMU
 | 
					        name: Set up QEMU
 | 
				
			||||||
        uses: docker/setup-qemu-action@v1
 | 
					        uses: docker/setup-qemu-action@v1
 | 
				
			||||||
        if: matrix.driver == 'docker' || matrix.driver == 'docker-container'
 | 
					        if: matrix.driver == 'docker' || matrix.driver == 'docker-container'
 | 
				
			||||||
      -
 | 
					 | 
				
			||||||
        name: Set up Docker Buildx
 | 
					 | 
				
			||||||
        uses: docker/setup-buildx-action@v1
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          version: latest
 | 
					 | 
				
			||||||
      -
 | 
					      -
 | 
				
			||||||
        name: Install buildx
 | 
					        name: Install buildx
 | 
				
			||||||
 | 
					        uses: actions/download-artifact@v3
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          name: binary
 | 
				
			||||||
 | 
					          path: /home/runner/.docker/cli-plugins
 | 
				
			||||||
 | 
					      -
 | 
				
			||||||
 | 
					        name: Fix perms and check
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          make install
 | 
					          chmod +x /home/runner/.docker/cli-plugins/docker-buildx
 | 
				
			||||||
          docker buildx version
 | 
					          docker buildx version
 | 
				
			||||||
      -
 | 
					      -
 | 
				
			||||||
        name: Init env vars
 | 
					        name: Init env vars
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user