Skip to content

Commit 04f38e6

Browse files
fix: workflow
1 parent 10e31ac commit 04f38e6

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ jobs:
3232
cd lifecycle_manager
3333
./build_lifecycle_manager.sh
3434
35-
# check if the zip file changed, if it did then the zip was rebuilt and we need to fail the build
36-
# it should be checked in as part of the PR.
37-
if git diff --name-only HEAD^ | grep -q 'lifecycle_manager/ec2-workerpool-lifecycle-manager.zip'; then
38-
echo "Lifecycle Manager zip file has been modified, build failed."
39-
exit 1
35+
# Check if rebuilding the zip creates any changes (indicating the committed zip is outdated)
36+
if git diff --exit-code -- ec2-workerpool-lifecycle-manager.zip; then
37+
echo "Lifecycle Manager zip file is up to date with main.py changes."
4038
else
41-
echo "Lifecycle Manager zip file has not been modified, build succeeded."
39+
echo "ERROR: Lifecycle Manager zip file is not up to date!"
40+
echo "The zip file in the repository doesn't match what would be generated from the current main.py."
41+
echo "Please rebuild the zip file using './lifecycle_manager/build_lifecycle_manager.sh' and commit the updated zip."
42+
exit 1
4243
fi
4344
else
44-
echo "Lifecycle Manager main.py has not been modified, skipping zip file check."
45+
echo "Lifecycle Manager main.py has not been modified, skipping zip file check."
4546
fi

0 commit comments

Comments
 (0)