From feda0a27f23d725f70e0a17ba62b6458065ad231 Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Mon, 8 Jan 2024 12:46:44 -0500 Subject: [PATCH] Start all runners every day to avoid GitHub runner removal. --- .github/workflows/start.yml | 1 - auto-shutdown.sh | 7 +------ configure-runners.yaml | 3 +-- start/action.yml | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/start.yml b/.github/workflows/start.yml index 6e474cb..760bc8f 100644 --- a/.github/workflows/start.yml +++ b/.github/workflows/start.yml @@ -21,4 +21,3 @@ jobs: with: OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} - number: 1 diff --git a/auto-shutdown.sh b/auto-shutdown.sh index 05eb2b4..8d4b448 100755 --- a/auto-shutdown.sh +++ b/auto-shutdown.sh @@ -20,12 +20,7 @@ if (( $num_users > 0 )); then fi runner_id=$(hostname | cut -d\- -f4) -recent_minutes=120 - -# keep some runners on for longer times to provide availability for pull reqeusts from forks -if (( $runner_id < 1 )); then - recent_minutes=720 -fi +recent_minutes=60 num_recently_modified=$(find /home/exouser/actions-runner/_diag -name "Worker*" -mmin -${recent_minutes} | wc -l) echo $(date): $num_recently_modified files in _diag were modified in the last ${recent_minutes} minutes diff --git a/configure-runners.yaml b/configure-runners.yaml index a5c95cb..3492b9b 100644 --- a/configure-runners.yaml +++ b/configure-runners.yaml @@ -2,7 +2,7 @@ hosts: action_runners vars: # TODO: determine latest actions version automatically - actions_version: 2.309.0 + actions_version: 2.311.0 actions_path: /home/exouser/actions-runner vars_prompt: - name: token @@ -23,7 +23,6 @@ ansible.builtin.stat: path: "{{ actions_path }}" register: check_path - - name: Install the Github Actions runner when: not check_path.stat.exists block: diff --git a/start/action.yml b/start/action.yml index fdcbc9d..b9511d9 100644 --- a/start/action.yml +++ b/start/action.yml @@ -14,7 +14,7 @@ inputs: runs: using: "composite" steps: - - uses: actions/cache@v3.3.1 + - uses: actions/cache@v3.3.2 with: path: ~/.cache/pip key: jetstream2-admin-${{ runner.os }}-pip-v1.2.2-${{ hashFiles('**/requirements.txt') }}