Skip to content

Commit fcfcf66

Browse files
committed
test: grep image replacement
1 parent 646c1fb commit fcfcf66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pi/edit_dockerfile.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ PI_EXISTING_TAG=$(grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:v.*-${PARENT_IMA
2323
PI_EXISTING_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${PI_EXISTING_TAG}"
2424
PI_NEW_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${RELEASE_TAG}-${PARENT_IMAGE_TYPE}"
2525

26-
DOCKER_CONTENT="$(sed 's|'${PI_EXISTING_IMAGE}'|'${PI_NEW_IMAGE}'|g' ${DOCKERFILE})"
26+
sed -e 's|'${PI_EXISTING_IMAGE}'|'${PI_NEW_IMAGE}'|g' ${DOCKERFILE} > ${DOCKERFILE}.tmp && mv ${DOCKERFILE}.tmp ${DOCKERFILE}
2727
echo ${DOCKER_CONTENT} > ${DOCKERFILE}
2828
echo "::notice::Dockerfile updated with new image: ${PI_NEW_IMAGE}"

0 commit comments

Comments
 (0)