Skip to content

Commit 68372a3

Browse files
committed
ci: migrate governance workflows to reusable + add gh-aw checks
- Replace 7 inline governance workflows (prow, stale/unstale, signed-commits, non-main-gatekeeper) with thin callers to llm-d/llm-d-infra reusable workflows - Add .pre-commit-config.yaml with file hygiene, shellcheck, hadolint, markdownlint, yamllint, and zizmor hooks - Add pre-commit CI job to ci-pr-checks.yaml - Replace standalone check-typos.yaml and md-link-check.yml with gh-aw AI-powered typo-checker and link-checker workflows - Add copilot-setup-steps.yml, actions-lock.json, and .gitattributes for gh-aw infrastructure Signed-off-by: Andy Anderson <andy@clubanderson.com> Signed-off-by: Andrew Anderson <andy@clubanderson.com>
1 parent a0c8d17 commit 68372a3

18 files changed

+2485
-187
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.github/workflows/*.lock.yml linguist-generated=true merge=ours
2+
.github/workflows/*.campaign.g.md linguist-generated=true merge=ours

.github/aw/actions-lock.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v8": {
4+
"repo": "actions/github-script",
5+
"version": "v8",
6+
"sha": "ed597411d8f924073f98dfc5c65a23a2325f34cd"
7+
},
8+
"github/gh-aw/actions/setup@v0.45.0": {
9+
"repo": "github/gh-aw/actions/setup",
10+
"version": "v0.45.0",
11+
"sha": "58d1d157fbac0f1204798500faefc4f7461ebe28"
12+
}
13+
}
14+
}

.github/workflows/check-typos.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/ci-pr-checks.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,26 @@ on:
99
- main
1010

1111
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v6
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
23+
- name: Install pre-commit and tools
24+
run: |
25+
pip install pre-commit
26+
sudo apt-get update && sudo apt-get install -y shellcheck
27+
curl -sL https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 -o /usr/local/bin/hadolint && chmod +x /usr/local/bin/hadolint
28+
29+
- name: Run pre-commit
30+
run: pre-commit run --all-files
31+
1232
check-changes:
1333
runs-on: ubuntu-latest
1434
outputs:
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1-
name: Check Signed Commits in PR
2-
3-
on:
4-
pull_request_target:
5-
1+
name: Check Signed Commits
2+
on: pull_request_target # zizmor: ignore[dangerous-triggers]
63
jobs:
7-
check-signed-commits:
8-
name: Check signed commits in PR
9-
runs-on: ubuntu-latest
4+
signed-commits:
5+
uses: llm-d/llm-d-infra/.github/workflows/reusable-signed-commits.yml@main
106
permissions:
117
contents: read
12-
pull-requests: write # Required to post comments on PRs
13-
steps:
14-
- name: Check signed commits in PR
15-
uses: 1Password/check-signed-commits-action@v1 # Use the action
16-
with:
17-
comment: |
18-
🚨 Unsigned commits detected! Please sign your commits.
19-
20-
For instructions on how to set up GPG/SSH signing and verify your commits, please see [GitHub Documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification).
8+
pull-requests: write
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Copilot Setup Steps"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
9+
jobs:
10+
copilot-setup-steps:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- name: Install gh-aw extension
16+
run: |
17+
curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash
18+
19+
- name: Verify gh-aw installation
20+
run: gh aw version

0 commit comments

Comments
 (0)