Skip to content

Commit

Permalink
fixing condition check
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCreator committed Aug 23, 2023
1 parent fe37fbe commit a21b493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebook/github-runner/github-runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NOTEBOOK_DIR="$(dirname "$SCRIPT_DIR")"
PROJ_DIR="$(dirname "$NOTEBOOK_DIR")"

# Assume the ACTION dir, is 4 dir levels up
ACTION_DIR="$(dirname "$PROJ_DIR/../../../")"
ACTION_DIR="$(dirname "$PROJ_DIR/../../../../")"
ACTION_DIR="$(cd "$ACTION_DIR" && pwd)"

# Cache dir to use when possible
Expand Down Expand Up @@ -74,7 +74,7 @@ CACHE_SIZE=$(du -sh $CACHE_DIR | awk '{print $1}')
CACHE_SIZE_BYTES=$(convert_to_bytes $CACHE_SIZE)

# If the cache dir is larger then RUNNER_CACHE_SIZE_LIMIT, then delete the cache dir
if [[ "$CACHE_SIZE_BYTES" >= "$RUNNER_CACHE_SIZE_LIMIT_BYTES" ]]; then
if [[ "$CACHE_SIZE_BYTES" -gt "$RUNNER_CACHE_SIZE_LIMIT_BYTES" ]]; then
echo "# [NOTE] Cache dir size ($CACHE_SIZE) is larger/equal to RUNNER_CACHE_SIZE_LIMIT ($RUNNER_CACHE_SIZE_LIMIT)"
echo "# [NOTE] Resetting cache dir: $CACHE_DIR"
rm -rf "$CACHE_DIR"
Expand Down

0 comments on commit a21b493

Please sign in to comment.