mirror of https://github.com/inclusionAI/AReaL
ci: fix on demand condition
This commit is contained in:
parent
8e201ef3e2
commit
a70cd28f8f
|
@ -6,6 +6,9 @@ GIT_COMMIT_SHA=${GIT_COMMIT_SHA:?"GIT_COMMIT_SHA is not set"}
|
|||
|
||||
echo "GIT_COMMIT_SHA: $GIT_COMMIT_SHA"
|
||||
|
||||
RUN_ID="areal-$GIT_COMMIT_SHA"
|
||||
cd "/tmp/$RUN_ID"
|
||||
|
||||
# If there is already an image for the current environment, skip the build.
|
||||
ENV_SHA=$(sha256sum pyproject.toml | awk '{print $1}')
|
||||
if docker images --format '{{.Repository}}:{{.Tag}}' | grep -q "areal-env:$ENV_SHA"; then
|
||||
|
@ -13,9 +16,6 @@ if docker images --format '{{.Repository}}:{{.Tag}}' | grep -q "areal-env:$ENV_S
|
|||
exit 0
|
||||
fi
|
||||
|
||||
RUN_ID="areal-$GIT_COMMIT_SHA"
|
||||
cd "/tmp/$RUN_ID"
|
||||
|
||||
if docker ps -a --format '{{.Names}}' | grep -q "$RUN_ID"; then
|
||||
docker rm -f $RUN_ID
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue