Skip to content

Commit 4fdc6ac

Browse files
committed
ci: use shared docs CI orchestrator in docs-check
Replace the duplicated detect-changes/docs-checks/gate/notify-docs logic with a thin caller of gardenlinux/docs aggregated-repo-docs.yml. The orchestrator decides documentation paths from repos-config.json, so this repository no longer creates a docs preview PR for merges that do not touch documentation paths. Signed-off-by: Eike Waldt <waldt@b1-systems.de> On-behalf-of: SAP <eike.waldt@sap.com> Assisted-by: Kilo:claude-sonnet-4-6
1 parent 2095181 commit 4fdc6ac

1 file changed

Lines changed: 10 additions & 63 deletions

File tree

‎.github/workflows/docs-check.yml‎

Lines changed: 10 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,21 @@
11
name: Documentation Quality Check
22

3+
# Thin caller for the documentation CI orchestrator in gardenlinux/docs.
4+
#
5+
# All documentation-path logic and the notify/commit-lock decision live in
6+
# gardenlinux/docs/.github/workflows/aggregated-repo-docs.yml, which uses
7+
# repos-config.json as the single source of truth for documentation paths.
8+
39
on:
410
pull_request:
511
branches: [main]
612
types: [opened, synchronize, reopened, closed]
7-
paths:
8-
- 'docs/**'
913
push:
1014
branches: [main]
11-
paths:
12-
- 'docs/**'
1315

1416
jobs:
15-
docs-checks:
16-
# Skip checks on closed PRs (only need the notification)
17-
if: github.event_name != 'pull_request' || github.event.action != 'closed'
18-
uses: gardenlinux/docs/.github/workflows/docs-checks.yml@main
17+
docs:
18+
uses: gardenlinux/docs/.github/workflows/aggregated-repo-docs.yml@main
1919
with:
20-
override-repo: ${{ github.event.repository.name }}
21-
override-ref: ${{ github.head_ref || github.ref_name }}
22-
override-commit: ${{ github.event.pull_request.head.sha || github.sha }}
23-
24-
notify-docs:
25-
name: Notify docs
26-
needs: [docs-checks]
27-
runs-on: ubuntu-24.04
28-
# Only notify for PR events (not push events which lack PR context)
29-
# Run after checks pass for open PRs, OR immediately for merged PRs
30-
if: |
31-
always() &&
32-
github.event_name == 'pull_request' &&
33-
(
34-
(github.event.action == 'closed' && github.event.pull_request.merged == true) ||
35-
(github.event.action != 'closed' && needs.docs-checks.result == 'success')
36-
)
37-
steps:
38-
- name: Generate GitHub App token
39-
id: app-token
40-
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
41-
with:
42-
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
43-
private-key: ${{ secrets.DOCS_BOT_PRIVATE_KEY }}
44-
repositories: docs
45-
46-
- name: Send repository dispatch to docs
47-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
48-
with:
49-
github-token: ${{ steps.app-token.outputs.token }}
50-
script: |
51-
const isMergedPR = context.payload.action === 'closed' &&
52-
context.payload.pull_request.merged === true;
53-
54-
// For merged PRs, use the base branch (the branch it was merged into)
55-
// For open PRs, use the head branch (feature branch)
56-
const ref = isMergedPR
57-
? context.payload.pull_request.base.ref
58-
: context.payload.pull_request.head.ref;
59-
60-
await github.rest.repos.createDispatchEvent({
61-
owner: 'gardenlinux',
62-
repo: 'docs',
63-
event_type: 'docs-pr',
64-
client_payload: {
65-
repo: '${{ github.event.repository.name }}',
66-
pr_number: `${context.payload.pull_request.number}`,
67-
commit_sha: isMergedPR
68-
? context.payload.pull_request.merge_commit_sha
69-
: context.payload.pull_request.head.sha,
70-
ref: ref,
71-
event: isMergedPR ? 'merged' : 'pr_success'
72-
}
73-
});
74-
core.info('Repository dispatch sent to docs');
20+
repo: package-linux
21+
secrets: inherit

0 commit comments

Comments
 (0)