Skip to content

feat(ci): add actionlint workflow + self-hosted runner whitelist#12

Merged
k2kite-megankim merged 4 commits into
mainfrom
feat/actionlint-ci
May 3, 2026
Merged

feat(ci): add actionlint workflow + self-hosted runner whitelist#12
k2kite-megankim merged 4 commits into
mainfrom
feat/actionlint-ci

Conversation

@k2kite-megankim
Copy link
Copy Markdown
Contributor

요약

`actionlint` workflow 추가 — 모든 PR + main push 에서 `marketplace-publish.yml` / `plugin-ci.yml` / `validate-plugin-manifest.yml` 검증.

동기

오늘 reusable workflow 도입 시 발생한 회귀:

  • `marketplace-publish.yml` 의 shell `#` 코멘트에 literal `${{ }}` 가 들어있어 GitHub Actions parser 가 빈 expression 으로 해석 시도
  • `referenced_workflows: []`, 0 jobs run 으로 silent fail
  • v0.1.23 / v0.1.24 / v0.1.25 / v0.1.25 (workflow_dispatch) 4번 canary 시도 끝에 발견
  • `actionlint` 로 로컬 실행 시 정확한 file:line:col + 명료한 메시지 발견 — PR 단계에서 차단 가능

변경

  • `.github/workflows/actionlint.yml`: PR/push 시 actionlint v1.7.12 다운로드 + 레포 내 모든 워크플로 검증. shellcheck 번들로 `run:` 블록 이슈도 같이 잡음.
  • `.github/actionlint.yaml`: `oracle` self-hosted runner 라벨 whitelist (false-positive 차단). 나머지 라벨 (`self-hosted`, `linux`, `arm64`) 은 actionlint 가 이미 알고 있음.

검증

  • 로컬 `actionlint` 실행 → 4개 워크플로 모두 clean
  • v1.7.12 이전 버전이 잡지 못한 케이스 없음 (오늘 회귀 케이스가 정확히 잡혔음)

P3 follow-up 항목 1/3

오늘 회기 마무리 P3 중 highest leverage 항목. 나머지 2개:

  • ms-graph `msgraph_auth` null-shell 테스트 (별도 PR)
  • agent-hub encrypted-token-path 테스트 (별도 PR)

k2kite-megankim and others added 4 commits May 3, 2026 23:28
Catches GitHub Actions expression / shell / yaml errors at PR review
time instead of post-merge tag-push.

Today's marketplace-publish.yml regression — an `\${{ }}` literal
embedded in a shell `#` comment that GitHub evaluated as an empty
expression — failed silently at workflow-load (referenced_workflows:
[], 0 jobs ran) and took 4 canary attempts to diagnose. actionlint
caught the issue locally with a precise file:line:col error pointing
at the comment.

This workflow:
- Runs on every PR + every push to main
- Lints all 4 workflow files this repo owns (marketplace-publish,
  plugin-ci, validate-plugin-manifest, actionlint itself)
- Uses upstream rhysd/actionlint installer pinned to v1.7.12
- shellcheck bundled by default — also catches `run:` block issues

`.github/actionlint.yaml` whitelists the `oracle` self-hosted runner
label so the linter doesn't false-positive flag it (the rest of our
labels — `self-hosted`, `linux`, `arm64` — are already known to
actionlint).

Verified: locally ran `./actionlint -no-color` against all 4
workflow files post-config — clean.

Closes lvis-project/.github P3 follow-up from the
reusable-workflow-rollout retro.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…comment fix

Self-review LOW items applied:

1. Installer script ref `main` → `v1.7.12` — pinning the binary
   version arg alone left upstream free to rewrite the installer
   script itself. Both refs now pinned to the same release.

2. Explicit `permissions: { contents: read }` block. Inheriting from
   org default works today but the explicit block makes the
   read-only intent self-documenting in the workflow file.

3. Header comment "three reusable workflows" → "three + this
   actionlint.yml itself" since actionlint auto-discovers all
   .github/workflows/*.yml from the repo root and lints itself too.

No behavior change beyond the supply-chain tightening.
CI ran the workflow and actionlint exited 2 with a help dump because
`-color=never` is not a recognized flag. The actionlint CLI uses
boolean toggles: `-color` (force on) and `-no-color` (force off) —
no `=value` form.

Caught by the workflow itself on first PR run, exactly the kind of
issue this workflow exists to surface (though it caught its own
typo rather than other workflows', which is also fine).
actionlint's bundled shellcheck flags SC2016 ("Expressions don't
expand in single quotes") on the resolver step's `node -e '...'`
block. False positive — the `$` chars inside the single-quoted JS
body are regex anchors (`/(^|\/)\.env($|\.|\/)/` etc.) and
`process.env.X` accesses, not shell variable interpolation.

Adds inline `# shellcheck disable=SC2016` directive scoped to that
single run block. Comment explains the false-positive context so
future readers know why the rule is suppressed.
@k2kite-megankim k2kite-megankim merged commit 4cb09fe into main May 3, 2026
1 check passed
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