Skip to content

Commit

Permalink
Start all runners every day to avoid GitHub runner removal.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Jan 8, 2024
1 parent 78961e1 commit feda0a2
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion .github/workflows/start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 1 addition & 6 deletions auto-shutdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions configure-runners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion start/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down

0 comments on commit feda0a2

Please sign in to comment.