mirror of
				https://git.unlock-music.dev/um/web.git
				synced 2025-11-04 09:03:38 +08:00 
			
		
		
		
	Fix: [CI] Build Docker Image
This commit is contained in:
		
							parent
							
								
									3a5afeb8a6
								
							
						
					
					
						commit
						85fdbff00d
					
				
							
								
								
									
										30
									
								
								.github/workflows/release-docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/release-docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,30 @@
 | 
				
			|||||||
 | 
					name: Publish Docker image
 | 
				
			||||||
 | 
					on:
 | 
				
			||||||
 | 
					  release:
 | 
				
			||||||
 | 
					    types: [ published ]
 | 
				
			||||||
 | 
					jobs:
 | 
				
			||||||
 | 
					  - name: Download release content
 | 
				
			||||||
 | 
					    run: |
 | 
				
			||||||
 | 
					      wget -o modern.tar.gz "https://github.com/ix64/unlock-music/releases/download/${{ GITHUB_REF }}/modern.tar.gz"
 | 
				
			||||||
 | 
					      mkdir ./dist
 | 
				
			||||||
 | 
					      tar zxvf modern.tar.gz -C ./dist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - name: Set up Docker Buildx
 | 
				
			||||||
 | 
					    uses: docker/setup-buildx-action@v1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - name: Login to DockerHub
 | 
				
			||||||
 | 
					    uses: docker/login-action@v1
 | 
				
			||||||
 | 
					    with:
 | 
				
			||||||
 | 
					      username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
				
			||||||
 | 
					      password: ${{ secrets.DOCKERHUB_TOKEN }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  - name: Build docker and push (on modern)
 | 
				
			||||||
 | 
					    uses: docker/build-push-action@v2
 | 
				
			||||||
 | 
					    with:
 | 
				
			||||||
 | 
					      context: .
 | 
				
			||||||
 | 
					      file: ./Dockerfile
 | 
				
			||||||
 | 
					      platforms: linux/amd64,linux/arm64,linux/386
 | 
				
			||||||
 | 
					      push: true
 | 
				
			||||||
 | 
					      tags: |
 | 
				
			||||||
 | 
					        ix64/unlock-music:latest
 | 
				
			||||||
 | 
					        ix64/unlock-music:${{ GITHUB_REF }}
 | 
				
			||||||
							
								
								
									
										20
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@ -132,23 +132,3 @@ jobs:
 | 
				
			|||||||
          asset_path: ./sha256sum.txt
 | 
					          asset_path: ./sha256sum.txt
 | 
				
			||||||
          asset_name: sha256sum.txt
 | 
					          asset_name: sha256sum.txt
 | 
				
			||||||
          asset_content_type: text/plain
 | 
					          asset_content_type: text/plain
 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Set up Docker Buildx
 | 
					 | 
				
			||||||
        uses: docker/setup-buildx-action@v1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Login to DockerHub
 | 
					 | 
				
			||||||
        uses: docker/login-action@v1
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          username: ${{ secrets.DOCKERHUB_USERNAME }}
 | 
					 | 
				
			||||||
          password: ${{ secrets.DOCKERHUB_TOKEN }}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      - name: Build docker and push (on modern)
 | 
					 | 
				
			||||||
        uses: docker/build-push-action@v2
 | 
					 | 
				
			||||||
        with:
 | 
					 | 
				
			||||||
          context: .
 | 
					 | 
				
			||||||
          file: ./Dockerfile
 | 
					 | 
				
			||||||
          platforms: linux/amd64,linux/arm64,linux/386
 | 
					 | 
				
			||||||
          push: true
 | 
					 | 
				
			||||||
          tags: |
 | 
					 | 
				
			||||||
            ix64/unlock-music:latest
 | 
					 | 
				
			||||||
            ix64/unlock-music:${{ GITHUB_REF#refs/tags/ }}
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user