@@ -22,23 +22,22 @@ jobs:
2222 packages : read
2323 steps :
2424 - name : Checkout code
25- uses : actions/checkout@v5
25+ uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
2626 with :
2727 ref : ${{ env.BRANCH_NAME }}
2828
2929 - name : Get asdf version
3030 id : asdf-version
3131 run : echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT"
3232
33-
3433 # using git commit sha for version of action to ensure we have stable version
3534 - name : Install asdf
3635 uses : asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
3736 with :
3837 asdf_version : ${{ steps.asdf-version.outputs.version }}
3938
4039 - name : Cache asdf
41- uses : actions/cache@v4
40+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
4241 with :
4342 path : |
4443 ~/.asdf
@@ -67,16 +66,18 @@ jobs:
6766
6867 - name : Build Python Lambda Functions
6968 run : |
70- poetry export --without-hashes --format=requirements.txt --with slackBotFunction > requirements_slackBotFunction
71- poetry export --without-hashes --format=requirements.txt --with syncKnowledgeBaseFunction > requirements_syncKnowledgeBaseFunction
72- if [ ! -s requirements_slackBotFunction ]; then \
73- echo "Error: requirements_slackBotFunction is empty or missing "; \
69+ poetry show --only=slackBotFunction | grep -E "^[a-zA-Z]" | awk '{print $1"=="$2}' > requirements_slackBotFunction
70+ poetry show --only=syncKnowledgeBaseFunction | grep -E "^[a-zA-Z]" | awk '{print $1"=="$2}' > requirements_syncKnowledgeBaseFunction
71+ if [ ! -s requirements_slackBotFunction ] || [ "$(grep -c -v '^[[:space:]]*$' requirements_slackBotFunction)" -eq 0 ] ; then \
72+ echo "Error: requirements_slackBotFunction is empty or contains only blank lines "; \
7473 exit 1; \
7574 fi
76- if [ ! -s requirements_syncKnowledgeBaseFunction ]; then \
77- echo "Error: requirements_syncKnowledgeBaseFunction is empty or missing "; \
75+ if [ ! -s requirements_syncKnowledgeBaseFunction ] || [ "$(grep -c -v '^[[:space:]]*$' requirements_syncKnowledgeBaseFunction)" -eq 0 ] ; then \
76+ echo "Error: requirements_syncKnowledgeBaseFunction is empty or contains only blank lines "; \
7877 exit 1; \
7978 fi
79+ mkdir -p .dependencies/slackBotFunction/python
80+ mkdir -p .dependencies/syncKnowledgeBaseFunction/python
8081 pip3 install -r requirements_slackBotFunction -t .dependencies/slackBotFunction/python
8182 pip3 install -r requirements_syncKnowledgeBaseFunction -t .dependencies/syncKnowledgeBaseFunction/python
8283
0 commit comments