From 8f627d680a2f09dcf656c2be5bb7bc821f4b530a Mon Sep 17 00:00:00 2001 From: casjay Date: Mon, 2 Sep 2024 15:40:42 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/tmp/etc/act_runner/cache_server.yaml rootfs/tmp/etc/act_runner/default_config.yaml rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh --- rootfs/tmp/etc/act_runner/cache_server.yaml | 4 ++-- rootfs/tmp/etc/act_runner/default_config.yaml | 6 +----- rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh | 1 + 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/rootfs/tmp/etc/act_runner/cache_server.yaml b/rootfs/tmp/etc/act_runner/cache_server.yaml index d9bff26..852a5c7 100644 --- a/rootfs/tmp/etc/act_runner/cache_server.yaml +++ b/rootfs/tmp/etc/act_runner/cache_server.yaml @@ -3,7 +3,7 @@ log: level: info cache: - # Enable cache server to use actions/cache. enabled: true - # The directory to store the cache data. dir: '/data/act_runner/cache' + host: '0.0.0.0' + port: 'REPLACE_RUNNER_CACHE_PORT' diff --git a/rootfs/tmp/etc/act_runner/default_config.yaml b/rootfs/tmp/etc/act_runner/default_config.yaml index cc34a71..f64fdfa 100644 --- a/rootfs/tmp/etc/act_runner/default_config.yaml +++ b/rootfs/tmp/etc/act_runner/default_config.yaml @@ -66,9 +66,5 @@ container: docker_host: '' cache: - # Enable cache server to use actions/cache. enabled: true - # The host of the cache server. - host: 'REPLACE_RUNNER_CACHE_HOST' - # The port of the cache server. - port: REPLACE_RUNNER_CACHE_PORT + external_server: 'http://REPLACE_RUNNER_CACHE_HOST:REPLACE_RUNNER_CACHE_PORT/' diff --git a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh index f6ae996..29da7f1 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh @@ -486,6 +486,7 @@ __post_execute() { fi if [ -f "$CACHE_CONFIG_FILE" ]; then mkdir -p "$DATA_DIR/cache" + __replace "REPLACE_RUNNER_CACHE_PORT" "$RUNNER_CACHE_PORT" "$CACHE_CONFIG_FILE" act_runner cache-server --config $CACHE_CONFIG_FILE -s 0.0.0.0 -p $RUNNER_CACHE_PORT 2>>/dev/stderr | tee -a -p "$LOG_DIR/cache.log" & execPid=$! if sleep 5 && ps ax | awk '{print $1}' | grep -v grep | grep -q "$execPid$"; then