Skip to content

Commit b238778

Browse files
committed
Print out version.txt path
1 parent c80e6c4 commit b238778

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/cdk_release_code.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,18 @@ jobs:
101101
102102
- name: Copy version.txt from Docker image into .build
103103
run: |
104-
docker run --rm --entrypoint bash cdk-utils-build-repo:latest \
105-
-c 'find / -name version.txt 2>/dev/null | head -n1 | xargs cat' \
106-
> .build/version.txt
104+
docker run --rm --entrypoint bash cdk-utils-build-repo:latest -c '
105+
path=$(find / -name version.txt 2>/dev/null | head -n1)
106+
if [ -z "$path" ]; then
107+
echo "version.txt not found in container."
108+
exit 1
109+
fi
110+
echo "Found version.txt at: $path"
111+
echo "----------------------------------------"
112+
cat "$path"
113+
echo "----------------------------------------"
114+
cat "$path" > /workspace/version.txt
115+
' && mv version.txt .build/version.txt
107116
108117
- name: Configure AWS Credentials
109118
id: connect-aws

0 commit comments

Comments
 (0)