Skip to content

DOTFI-24: Run CI on the self-hosted runner - #36

Merged
JtheGunner merged 3 commits into
mainfrom
chore/DOTFI-24-run-ci-on-self-hosted-runner
Nov 23, 2026
Merged

JtheGunner merged 3 commits into
mainfrom
chore/DOTFI-24-run-ci-on-self-hosted-runner

Conversation

@JtheGunner

Copy link
Copy Markdown
Owner

YouTrack: https://youtrack.xn--wrm-hoa.li/issue/DOTFI-24

Run the Linux leg of lint-test and the secrets job on the self-hosted runner dev-worker-tp. The macOS leg and bootstrap stay on GitHub-hosted runners.

  • Select the self-hosted runner (self-hosted, Linux, X64, docker) only for non-PR events and for same-repo, non-Dependabot pull requests; everything else falls back to ubuntu-latest.
  • Install zsh and shellcheck without sudo when running as root (the runner image has no sudo).
  • Copy the checkout into the gitleaks container (docker create + docker cp) instead of bind-mounting $PWD, since the runner is itself a container and $PWD is not a host path.

Commits:

  • ci: run lint-test (Linux) and secret scan on the self-hosted runner
  • ci: gate the self-hosted runner on a positive trust check
  • ci: identify Dependabot PRs by author and branch, not by actor

Test plan

  • make lint and make test pass locally.
  • The workflow expressions were checked by hand only (actionlint was not available).
  • Reviewer: confirm in this PR's run that lint + test (ubuntu-latest) and secret scan ran on dev-worker-tp and passed, and that lint + test (macos-latest) and bootstrap ran on GitHub-hosted runners.
  • Reviewer: confirm the gitleaks step fails the job when it finds a secret (exit code is passed through by docker start -a).

Review: skipped (not independently reviewed)

Fork PRs and the macOS leg stay on GitHub-hosted runners, as does the
bootstrap job, which needs a pristine Ubuntu machine. The gitleaks step
copies the checkout into the scan container instead of bind-mounting it,
because the runner is itself a container and $PWD is not a host path.

Refs DOTFI-24
Select the self-hosted runner only for non-PR events and for same-repo,
non-Dependabot pull requests, so a missing head repo or any cross-repo PR
falls back to GitHub-hosted runners. Let the gitleaks step return the scan
container's exit code directly instead of masking it.

Refs DOTFI-24
github.actor is whoever triggered the run, so a maintainer re-running a
Dependabot PR would have moved it onto the self-hosted runner. Use the PR
author and the head branch prefix instead.

Refs DOTFI-24
@JtheGunner
JtheGunner merged commit 4f70910 into main Nov 23, 2026
5 checks passed
@JtheGunner
JtheGunner deleted the chore/DOTFI-24-run-ci-on-self-hosted-runner branch November 23, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant