Skip to content

ci: run lightweight PR checks on self-hosted runners#4116

Merged
arealmaas merged 2 commits into
mainfrom
arealmaas/self-hosted-gh-runners
Jun 15, 2026
Merged

ci: run lightweight PR checks on self-hosted runners#4116
arealmaas merged 2 commits into
mainfrom
arealmaas/self-hosted-gh-runners

Conversation

@arealmaas

Copy link
Copy Markdown
Collaborator

Description

Initial easy-win test of the new Altinn self-hosted runner infrastructure. Switches three lightweight, non-Docker, PR-triggered workflows from ubuntu-latest to self-hosted:

  • workflow-check-for-changes.yml (checkout + step-security/changed-files)
  • workflow-get-current-version.yml (checkout + cat version.txt)
  • workflow-generate-git-short-sha.yml (checkout + git rev-parse)

All three run on every PR via ci-cd-pull-request.yml, so this is easy to observe.

⚠️ Draft — do not merge yet

Depends on Altinn/altinn-platform#3707, which provisions the dialogporten runners. That PR must merge and deploy first, and a runner must show up under repo Settings → Actions → Runners — otherwise these jobs queue with no runner to pick them up. Mark ready for review once a runner is online.

Notes

  • Left ci-cd-pull-request-title.yml on ubuntu-latest on purpose — it uses pull_request_target (fork-job risk), not a good place to start.
  • Watch check-for-changes: it uses step-security/harden-runner (audit mode), which has limited self-hosted support. If it misbehaves, the two trivial helpers are the cleanest signal that self-hosted works.

Verification

  • Runner online for Altinn/dialogporten
  • The three jobs run to completion on self-hosted

🤖 Generated with Claude Code

Switch the non-Docker, PR-triggered helper/check workflows to self-hosted
runners as an initial easy-win test of the new Altinn self-hosted runner
infrastructure:
- check-for-changes
- get-current-version
- generate-git-short-sha

Requires the dialogporten runners to be provisioned first via
Altinn/altinn-platform (infrastructure/gh-runners/dialogporten.tf).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5ad85a68-f07d-4975-bf5a-e58dfe492d48

📥 Commits

Reviewing files that changed from the base of the PR and between ab8d563 and a2b5d1e.

📒 Files selected for processing (4)
  • .github/workflows/ci-cd-pull-request-title.yml
  • .github/workflows/workflow-check-for-changes.yml
  • .github/workflows/workflow-generate-git-short-sha.yml
  • .github/workflows/workflow-get-current-version.yml

📝 Walkthrough

Walkthrough

Four GitHub Actions workflow jobs — validate, check-for-changes, generate-git-short-sha, and get-current-version — have their runs-on field changed from ubuntu-latest to self-hosted. No other job configuration, steps, or outputs are modified.

Changes

Runner Migration

Layer / File(s) Summary
Switch runs-on to self-hosted across workflows
.github/workflows/ci-cd-pull-request-title.yml, .github/workflows/workflow-check-for-changes.yml, .github/workflows/workflow-generate-git-short-sha.yml, .github/workflows/workflow-get-current-version.yml
Each of the four workflow jobs has its runs-on value changed from ubuntu-latest to self-hosted. All other steps, outputs, and permissions remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: migrating lightweight PR-check workflows to self-hosted runners.
Description check ✅ Passed The description covers the key context and includes verification checkpoints, but is missing the Related Issue(s) section required by the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch arealmaas/self-hosted-gh-runners

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Adds the PR title checker to the set of lightweight, non-Docker PR checks
moved to self-hosted runners. It does not check out PR/fork code, so the
pull_request_target trigger does not expose fork-code execution risk.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@arealmaas arealmaas marked this pull request as ready for review June 15, 2026 13:41
@arealmaas arealmaas requested review from a team as code owners June 15, 2026 13:41
@sonarqubecloud

Copy link
Copy Markdown

@arealmaas arealmaas merged commit 27641f5 into main Jun 15, 2026
32 of 33 checks passed
@arealmaas arealmaas deleted the arealmaas/self-hosted-gh-runners branch June 15, 2026 15:13
@github-actions github-actions Bot added the at23 Deployed to at23 label Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

at23 Deployed to at23

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants