mirror of
				https://github.com/containers/podman.git
				synced 2025-11-04 08:56:05 +08:00 
			
		
		
		
	Fix logic for pushing stable multi-arch images
The intention is to only push an image if there is ***NOT*** an existing
tag.  The original logic for this condition was inverted.
Also, improve radability of the `{container,podman}_push=true`
statements.
Signed-off-by: Chris Evich <cevich@redhat.com>
			
			
This commit is contained in:
		
							
								
								
									
										8
									
								
								.github/workflows/multi-arch-build.yaml
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										8
									
								
								.github/workflows/multi-arch-build.yaml
									
									
									
									
										vendored
									
									
								
							@ -77,7 +77,7 @@ jobs:
 | 
				
			|||||||
                      docker://$PODMAN_QUAY_REGISTRY/stable | \
 | 
					                      docker://$PODMAN_QUAY_REGISTRY/stable | \
 | 
				
			||||||
                      jq -r '.Tags[]')
 | 
					                      jq -r '.Tags[]')
 | 
				
			||||||
            PUSH="false"
 | 
					            PUSH="false"
 | 
				
			||||||
            if fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
 | 
					            if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
 | 
				
			||||||
                PUSH="true"
 | 
					                PUSH="true"
 | 
				
			||||||
            fi
 | 
					            fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -85,7 +85,7 @@ jobs:
 | 
				
			|||||||
            # Only push if version tag does not exist
 | 
					            # Only push if version tag does not exist
 | 
				
			||||||
            if [[ "$PUSH" == "true" ]]; then
 | 
					            if [[ "$PUSH" == "true" ]]; then
 | 
				
			||||||
              echo "Will push $FQIN"
 | 
					              echo "Will push $FQIN"
 | 
				
			||||||
              echo "::set-output name=podman_push::${PUSH}"
 | 
					              echo "::set-output name=podman_push::true"
 | 
				
			||||||
              echo "::set-output name=podman_fqin::${FQIN}"
 | 
					              echo "::set-output name=podman_fqin::${FQIN}"
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
              echo "Not pushing, $FQIN already exists."
 | 
					              echo "Not pushing, $FQIN already exists."
 | 
				
			||||||
@ -97,7 +97,7 @@ jobs:
 | 
				
			|||||||
                      docker://$CONTAINERS_QUAY_REGISTRY/podman | \
 | 
					                      docker://$CONTAINERS_QUAY_REGISTRY/podman | \
 | 
				
			||||||
                      jq -r '.Tags[]')
 | 
					                      jq -r '.Tags[]')
 | 
				
			||||||
            PUSH="false"
 | 
					            PUSH="false"
 | 
				
			||||||
            if fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
 | 
					            if ! fgrep -qx "$VERSION" <<<"$ALLTAGS"; then
 | 
				
			||||||
                PUSH="true"
 | 
					                PUSH="true"
 | 
				
			||||||
            fi
 | 
					            fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -105,7 +105,7 @@ jobs:
 | 
				
			|||||||
            # Only push if version tag does not exist
 | 
					            # Only push if version tag does not exist
 | 
				
			||||||
            if [[ "$PUSH" == "true" ]]; then
 | 
					            if [[ "$PUSH" == "true" ]]; then
 | 
				
			||||||
              echo "Will push $FQIN"
 | 
					              echo "Will push $FQIN"
 | 
				
			||||||
              echo "::set-output name=containers_push::${PUSH}"
 | 
					              echo "::set-output name=containers_push::true"
 | 
				
			||||||
              echo "::set-output name=containers_fqin::$FQIN"
 | 
					              echo "::set-output name=containers_fqin::$FQIN"
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
              echo "Not pushing, $FQIN already exists."
 | 
					              echo "Not pushing, $FQIN already exists."
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user