Skip to content

Commit 403a117

Browse files
committed
test: different grep method
1 parent 3980ecb commit 403a117

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/pi_release.yml

+6-5
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
with:
4545
token: ${{ secrets.GH_TOKEN }}
4646
repository: ${{ github.repository_owner }}/${{ matrix.app }}
47+
fetch-depth: 0
4748

4849
- name: Clone cicd-deployment-scripts
4950
run: git clone https://oauth2:${{ secrets.GH_TOKEN }}@github.com/code-kern-ai/cicd-deployment-scripts.git
@@ -58,11 +59,11 @@ jobs:
5859
git push origin "${{ env.HEAD_REF }}" && git pull origin "${{ env.HEAD_REF }}"
5960
6061
bash cicd-deployment-scripts/pi/edit_dockerfile.sh \
61-
-i ${{ env.PARENT_IMAGE_NAME }} \
62-
-t ${{ matrix.parent_image_type }} \
63-
-l ${{ github.event.release.tag_name }} \
64-
-r ${{ env.DOCKERHUB_CONTAINER_REGISTRY }} \
65-
-d ${{ env.DOCKERFILE }}
62+
-i "${{ env.PARENT_IMAGE_NAME }}" \
63+
-t "${{ matrix.parent_image_type }}" \
64+
-l "${{ github.event.release.tag_name }}" \
65+
-r "${{ env.DOCKERHUB_CONTAINER_REGISTRY }}" \
66+
-d "${{ env.DOCKERFILE }}"
6667
6768
git config user.email "[email protected]"
6869
git config user.name "GitHub Actions"

pi/edit_dockerfile.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
set -e
44

55
PARENT_IMAGE_NAME="refinery-parent-images"
6-
PARENT_IMAGE_TYPE="common"
7-
RELEASE_TAG="v1.19.1"
6+
PARENT_IMAGE_TYPE=""
7+
RELEASE_TAG=""
88
DOCKER_REGISTRY="kernai"
99
DOCKERFILE="Dockerfile"
1010

@@ -19,7 +19,7 @@ do
1919
esac
2020
done
2121

22-
line=$(grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:" $DOCKERFILE)
22+
line=$(grep "${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:v.*-${PARENT_IMAGE_TYPE}" $DOCKERFILE)
2323

2424
PI_EXISTING_TAG=$(echo $line | sed 's|FROM ||g' | cut -d ':' -f 2)
2525
PI_EXISTING_IMAGE="${DOCKER_REGISTRY}/${PARENT_IMAGE_NAME}:${PI_EXISTING_TAG}"

0 commit comments

Comments
 (0)