Skip to content

Commit db8ee40

Browse files
fix: validate poetry export to prevent empty requirements
1 parent bcde46e commit db8ee40

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/cdk_package_code.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
3232
with:
3333
asdf_branch: v0.14.1
34-
34+
3535
- name: Cache asdf
3636
uses: actions/cache@v4
3737
with:
@@ -63,10 +63,18 @@ jobs:
6363
run: |
6464
poetry export --without-hashes --format=requirements.txt --with slackBotFunction > requirements_slackBotFunction
6565
poetry export --without-hashes --format=requirements.txt --with syncKnowledgeBaseFunction > requirements_syncKnowledgeBaseFunction
66+
if [ ! -s requirements_slackBotFunction ]; then \
67+
echo "Error: requirements_slackBotFunction is empty or missing"; \
68+
exit 1; \
69+
fi
70+
if [ ! -s requirements_syncKnowledgeBaseFunction ]; then \
71+
echo "Error: requirements_syncKnowledgeBaseFunction is empty or missing"; \
72+
exit 1; \
73+
fi
6674
pip3 install -r requirements_slackBotFunction -t .dependencies/slackBotFunction/python
6775
pip3 install -r requirements_syncKnowledgeBaseFunction -t .dependencies/syncKnowledgeBaseFunction/python
6876
69-
- name: 'Tar files'
77+
- name: Tar files
7078
run: |
7179
tar -rf artifact.tar \
7280
.tool-versions \

0 commit comments

Comments
 (0)