Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci runner upsizing #165

Merged
merged 11 commits into from
Nov 14, 2024
4 changes: 2 additions & 2 deletions .github/nix_config/ci-runner/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

services = {
openssh.enable = true;
github-runner = {
github-runners.gh-runner = {
enable = true;
url = "https://github.com/cherusk/godon";
tokenFile = "/srv/gh_runner.token";
Expand Down Expand Up @@ -156,5 +156,5 @@

nixpkgs.config.allowUnfree = true;

system.nixos.version = "23.05";
system.nixos.version = "24.05";
}
17 changes: 10 additions & 7 deletions .github/workflows/runner_recreate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
## along with this godon. If not, see <http://www.gnu.org/licenses/>.
##

#
on:
pull_request:
types: [ labeled ]

env:
RUNNER_BASE_IMAGE: "Fedora 30"
RUNNER_BASE_IMAGE: "Debian 12"
INSTANCE_NAME: "ci_runner"
OS_AUTH_URL: https://oprod-controller1.osuosl.org:5000/v3
OS_AUTH_URL: "https://openstack.osuosl.org:5000/v3"
OS_PROJECT_NAME: "godon"
OS_USER_DOMAIN_NAME: "Default"
OS_PROJECT_DOMAIN_ID: "default"
Expand All @@ -37,8 +38,10 @@ env:

jobs:
ci_runner_recreate:
if: ${{ github.event.label.name == 'ci_runner' && github.event.label.name == 'recreate' }}
runs-on: ubuntu-18.04
if: |
contains(github.event.pull_request.labels.*.name, 'ci_runner') &&
contains(github.event.pull_request.labels.*.name, 'recreate')
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -77,16 +80,16 @@ jobs:
awk -F= '{ print $2 }' > ./instance_address
- name: infect with nixos
run: >
sleep 60;
sleep 120;
ansible "$(cat ./instance_address)"
-i "$(cat ./instance_address),"
--private-key ./access_key_file
--ssh-extra-args="-o StrictHostKeyChecking=accept-new"
-u fedora
--become
-u debian
-T 120
-m raw -a "hostnamectl set-hostname ci_runner;
curl ${NIXOS_INFECT_SCRIPT_URL} | NO_REBOOT=true NO_SWAP=true NIX_CHANNEL=nixos-21.11 bash -x;"
curl ${NIXOS_INFECT_SCRIPT_URL} | NO_REBOOT=true NO_SWAP=true NIX_CHANNEL=nixos-24.05 bash -x;"
ssh-keygen -R "$(cat ./instance_address)";
env:
NIXOS_INFECT_SCRIPT_URL: "https://raw.githubusercontent.com/elitak/nixos-infect/master/nixos-infect"
Expand Down