
はじめに
2026年10月19日から11月19日の期間で GitHub Actions の ubuntu-latest ラベルが Ubuntu 24.04 から Ubuntu 26.04 に段階的に変わるというアナウンスが出ている.
知らず知らずのうちにランナーが Ubuntu 26.04 に変わって CI エラーで気付くようなことは避けたく,もし GitHub Actions で ubuntu-latest を使っている場合は ubuntu-24.04 もしくは ubuntu-26.04 にピン留めしておくのが良いと思う.GitHub ブログにも「ubuntu-26.04 でテストをして移行が難しそうなら ubuntu-24.04 にピン留めして」と書いてある📝
Test your workflows against
ubuntu-26.04before the migration begins. If you are not ready to move, pin your workflows toubuntu-24.04to stay on the current image.
環境
- actionlint v1.7.12
label "ubuntu-26.04" is unknown.
ubuntu-26.04 にピン留めをしようとすると1つ問題がある.actionlint を使って GitHub Actions ワークフローの静的解析を実行している場合に
label "ubuntu-26.04" is unknown. というエラーが出てしまう🔥
$ actionlint .github/workflows/deploy.yml:10:14: label "ubuntu-26.04" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-intel", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label] | 10 | runs-on: ubuntu-26.04 | ^~~~~~~~~~~~
既にプルリクエストはいくつか出ているけど merge されていないという状況に見える.
- Add support for `ubuntu-26.04` runner by ericcornelissen · Pull Request #683 · rhysd/actionlint · GitHub
- Add Ubuntu 26.04 runner label support by soumeh01 · Pull Request #723 · rhysd/actionlint · GitHub
- Support `ubuntu-26.04`, bump `golang.org/x/net`, and fix CI by mxr · Pull Request #743 · rhysd/actionlint · GitHub
ワークアラウンド
actionlint では .github/actionlint.yaml という設定ファイルに GitHub Actions のセルフホステッドランナー (Self-hosted runners) のカスタムラベルを指定できる.
ここに ubuntu-26.04 を指定しておくと今回のエラーを回避するワークアラウンドになる.あくまで一時的な対策ではあるけど❗️
self-hosted-runner: labels: - ubuntu-26.04
すると label "ubuntu-26.04" is unknown. というエラーは出なくなる👌
まとめ
actionlint を使って GitHub Actions ワークフローの静的解析を実行しているけど ubuntu-26.04 にピン留めしたいという場合はワークアラウンドとして .github/actionlint.yaml の self-hosted-runner に ubuntu-26.04 を指定しよう💪