mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	ci : tag docker image with build number (#4584)
This commit is contained in:
		
							
								
								
									
										15
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							| @@ -69,6 +69,19 @@ jobs: | |||||||
|           docker-images: true |           docker-images: true | ||||||
|           swap-storage: true |           swap-storage: true | ||||||
|  |  | ||||||
|  |       - name: Determine tag name | ||||||
|  |         id: tag | ||||||
|  |         shell: bash | ||||||
|  |         run: | | ||||||
|  |           BUILD_NUMBER="$(git rev-list --count HEAD)" | ||||||
|  |           SHORT_HASH="$(git rev-parse --short=7 HEAD)" | ||||||
|  |           if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then | ||||||
|  |             echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT | ||||||
|  |           else | ||||||
|  |             SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-') | ||||||
|  |             echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT | ||||||
|  |           fi | ||||||
|  |  | ||||||
|       - name: Build and push Docker image (versioned) |       - name: Build and push Docker image (versioned) | ||||||
|         if: github.event_name == 'push' |         if: github.event_name == 'push' | ||||||
|         uses: docker/build-push-action@v4 |         uses: docker/build-push-action@v4 | ||||||
| @@ -85,5 +98,5 @@ jobs: | |||||||
|           context: . |           context: . | ||||||
|           push: ${{ github.event_name == 'push' }} |           push: ${{ github.event_name == 'push' }} | ||||||
|           platforms: ${{ matrix.config.platforms }} |           platforms: ${{ matrix.config.platforms }} | ||||||
|           tags: "ghcr.io/${{ github.repository_owner }}/llama.cpp:${{ matrix.config.tag }}" |           tags: "ghcr.io/${{ github.repository_owner }}/llama.cpp:${{ matrix.config.tag }}" , "ghcr.io/${{ github.repository_owner }}/llama.cpp:${{ matrix.config.tag }}-${{ steps.tag.outputs.name }}" | ||||||
|           file: ${{ matrix.config.dockerfile }} |           file: ${{ matrix.config.dockerfile }} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 rhuddleston
					rhuddleston