Skip to content

Commit

Permalink
test: debug edit_dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
andhreljaKern committed Dec 12, 2024
1 parent 876d7d2 commit 41c6957
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pi/edit_dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,12 @@ PI_EXISTING_TAG=$(grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:v.*-${PARENT_IMA
PI_EXISTING_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${PI_EXISTING_TAG}"
PI_NEW_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${RELEASE_TAG}-${PARENT_IMAGE_TYPE}"

sed -e 's|'${PI_EXISTING_IMAGE}'|'${PI_NEW_IMAGE}'|g' ${DOCKERFILE} > ${DOCKERFILE}.tmp && mv ${DOCKERFILE}.tmp ${DOCKERFILE}
echo "Dockerfile before update:"
cat ${DOCKERFILE}
sed 's|'${PI_EXISTING_IMAGE}'|'${PI_NEW_IMAGE}'|g' ${DOCKERFILE} > ${DOCKERFILE}.tmp && mv ${DOCKERFILE}.tmp ${DOCKERFILE}

echo "sed output:"
sed 's|'${PI_EXISTING_IMAGE}'|'${PI_NEW_IMAGE}'|g' ${DOCKERFILE}
echo "Dockerfile after update:"
cat ${DOCKERFILE}
echo "::notice::Dockerfile updated with new image: ${PI_NEW_IMAGE}"

0 comments on commit 41c6957

Please sign in to comment.