From 38113700d9cb7f9c91bb8ffb27d64d20116f602f Mon Sep 17 00:00:00 2001 From: Nick Jansen Date: Tue, 17 Sep 2024 16:11:17 +0200 Subject: [PATCH] Include 'src/runtime/**' in workflows and enhance cron setup. Added 'src/runtime/**' to the paths in multiple GitHub workflows to ensure they're triggered by changes in the runtime directory. Additionally, improved the cron setup by adding a crontab command in the entrypoint script and simplified the Dockerfile environment variables. --- .github/workflows/php-cli.yml | 1 + .github/workflows/php-nginx.yml | 1 + .github/workflows/php-ols.yml | 1 + src/Dockerfile | 3 +-- src/runtime/runtime/entrypoint.d/40-cron.sh | 1 + 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php-cli.yml b/.github/workflows/php-cli.yml index 5c5b698..688d200 100644 --- a/.github/workflows/php-cli.yml +++ b/.github/workflows/php-cli.yml @@ -6,6 +6,7 @@ on: - '2.x' paths: - 'src/php-*/**' + - 'src/runtime/**' - 'src/Dockerfile' - '.github/workflows/php-cli.yml' - '.github/workflows/build-php.yml' diff --git a/.github/workflows/php-nginx.yml b/.github/workflows/php-nginx.yml index 427eac7..d7be4c9 100644 --- a/.github/workflows/php-nginx.yml +++ b/.github/workflows/php-nginx.yml @@ -6,6 +6,7 @@ on: - '2.x' paths: - 'src/php-*/**' + - 'src/runtime/**' - 'src/Dockerfile' - '.github/workflows/php-nginx.yml' - '.github/workflows/build-php.yml' diff --git a/.github/workflows/php-ols.yml b/.github/workflows/php-ols.yml index 76b96cf..dcf0111 100644 --- a/.github/workflows/php-ols.yml +++ b/.github/workflows/php-ols.yml @@ -6,6 +6,7 @@ on: - '2.x' paths: - 'src/php-*/**' + - 'src/runtime/**' - 'src/Dockerfile' - '.github/workflows/php-ols.yml' - '.github/workflows/build-php.yml' diff --git a/src/Dockerfile b/src/Dockerfile index 539ccb1..995dce8 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -14,8 +14,7 @@ ENV RUNTIME_UID=1000 \ RUNTIME_FILES_DIR=/app/files \ RUNTIME_LOGS_DIR=/app/logs \ RUNTIME_VERBOSITY=1 \ - RUNTIME_BOOTED_FILE=/runtime/booted \ - RUNTIME_CRONTABS_DIR=/app/.config/crontabs + RUNTIME_BOOTED_FILE=/runtime/booted COPY --chmod=755 ./runtime/runtime/bin /runtime/bin diff --git a/src/runtime/runtime/entrypoint.d/40-cron.sh b/src/runtime/runtime/entrypoint.d/40-cron.sh index 8a0c385..5243ad0 100755 --- a/src/runtime/runtime/entrypoint.d/40-cron.sh +++ b/src/runtime/runtime/entrypoint.d/40-cron.sh @@ -9,6 +9,7 @@ if [ -n "$RUNTIME_CRONTAB" ]; then info "Cron: Enabled" touch /etc/s6-overlay/s6-rc.d/user/contents.d/cron template crontab.tmpl /var/spool/cron/crontabs/"$RUNTIME_USER" + crontab /var/spool/cron/crontabs/"$RUNTIME_USER" else info "Cron: Disabled" fi