update GHA workflow to expose the short sha to docker
This commit is contained in:
		
							parent
							
								
									33a5be5a7d
								
							
						
					
					
						commit
						ca91afe45b
					
				
							
								
								
									
										5
									
								
								.github/workflows/on-tag.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/on-tag.yml
									
									
									
									
										vendored
									
									
								
							@ -34,6 +34,9 @@ jobs:
 | 
				
			|||||||
      - name: Checkout project
 | 
					      - name: Checkout project
 | 
				
			||||||
        uses: actions/checkout@v2
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Add SHORT_SHA env property with commit short sha
 | 
				
			||||||
 | 
					        run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Init repo for Dockerization
 | 
					      - name: Init repo for Dockerization
 | 
				
			||||||
        run: docker/init.sh "$TAG"
 | 
					        run: docker/init.sh "$TAG"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -65,6 +68,7 @@ jobs:
 | 
				
			|||||||
          --platform linux/amd64,linux/arm64,linux/arm/v7 \
 | 
					          --platform linux/amd64,linux/arm64,linux/arm/v7 \
 | 
				
			||||||
          --tag ${{ secrets.DOCKER_HUB_USER }}/${{ matrix.service }}:$TAG \
 | 
					          --tag ${{ secrets.DOCKER_HUB_USER }}/${{ matrix.service }}:$TAG \
 | 
				
			||||||
          --output "type=registry" ./${{ matrix.service }}/
 | 
					          --output "type=registry" ./${{ matrix.service }}/
 | 
				
			||||||
 | 
					          --build-arg commitHash=$SHORT_SHA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Run Docker buildx for ${{ matrix.service }} against latest
 | 
					      - name: Run Docker buildx for ${{ matrix.service }} against latest
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
@ -74,4 +78,5 @@ jobs:
 | 
				
			|||||||
          --platform linux/amd64,linux/arm64,linux/arm/v7 \
 | 
					          --platform linux/amd64,linux/arm64,linux/arm/v7 \
 | 
				
			||||||
          --tag ${{ secrets.DOCKER_HUB_USER }}/${{ matrix.service }}:latest \
 | 
					          --tag ${{ secrets.DOCKER_HUB_USER }}/${{ matrix.service }}:latest \
 | 
				
			||||||
          --output "type=registry" ./${{ matrix.service }}/
 | 
					          --output "type=registry" ./${{ matrix.service }}/
 | 
				
			||||||
 | 
					          --build-arg commitHash=$SHORT_SHA
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user