diff --git a/action.yaml b/action.yaml index 0a655e5..5c291ee 100644 --- a/action.yaml +++ b/action.yaml @@ -144,8 +144,8 @@ runs: - name: Setup swapfile shell: bash - if: runner.arch == 'X64' || runner.arch == 'X86' run: | + sudo swapoff -a sudo fallocate -l 16G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile diff --git a/install/ensure-correct-permissions-profiles-dir.sh b/install/ensure-correct-permissions-profiles-dir.sh index 92792b2..2fd95b8 100755 --- a/install/ensure-correct-permissions-profiles-dir.sh +++ b/install/ensure-correct-permissions-profiles-dir.sh @@ -2,13 +2,16 @@ # TODO: Remove this after the next hard-stop -echo "${_group}Ensuring correct permissions on profiles directory ..." +# Should only run when `$COMPOSE_PROFILES` is set to `feature-complete` +if [[ "$COMPOSE_PROFILES" == "feature-complete" ]]; then + echo "${_group}Ensuring correct permissions on profiles directory ..." -# Check if the parent directory of /var/vroom/sentry-profiles is already owned by vroom:vroom -if [ "$($dcr --no-deps --entrypoint /bin/bash --user root vroom -c "stat -c '%U:%G' /var/vroom/sentry-profiles" 2>/dev/null)" = "vroom:vroom" ]; then - echo "Ownership of /var/vroom/sentry-profiles is already set to vroom:vroom. Skipping chown." -else - $dcr --no-deps --entrypoint /bin/bash --user root vroom -c 'chown -R vroom:vroom /var/vroom/sentry-profiles && chmod -R o+rwx /var/vroom/sentry-profiles' + # Check if the parent directory of /var/vroom/sentry-profiles is already owned by vroom:vroom + if [ "$($dcr --no-deps --entrypoint /bin/bash --user root vroom -c "stat -c '%U:%G' /var/vroom/sentry-profiles" 2>/dev/null)" = "vroom:vroom" ]; then + echo "Ownership of /var/vroom/sentry-profiles is already set to vroom:vroom. Skipping chown." + else + $dcr --no-deps --entrypoint /bin/bash --user root vroom -c 'chown -R vroom:vroom /var/vroom/sentry-profiles && chmod -R o+rwx /var/vroom/sentry-profiles' + fi + + echo "${_endgroup}" fi - -echo "${_endgroup}"