Skip to content

Commit 94596ff

Browse files
authored
Merge pull request #153 from IgniteUI/vkombov/add-aw-jp
feat(aw): add Japanese documentation auto-sync workflows
2 parents 0a6a1ae + a04d13b commit 94596ff

11 files changed

Lines changed: 4471 additions & 1392 deletions

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.md text eol=lf
22
*.mdx text eol=lf
3+
4+
.github/workflows/*.lock.yml linguist-generated=true merge=binary

.github/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Agentic Workflows (`gh-aw`)
2+
3+
This directory contains GitHub **agentic workflows** that automatically
4+
translate English documentation into Japanese when changes are pushed to
5+
`vnext`.
6+
7+
## Workflow files
8+
9+
| Source (`.md`) | Compiled (`.lock.yml`) | Watches |
10+
|---|---|---|
11+
| `workflows/sync-jp-docs-angular.md` | `workflows/sync-jp-docs-angular.lock.yml` | `docs/angular/src/content/en/**` on `vnext` |
12+
| `workflows/sync-jp-docs-xplat.md` | `workflows/sync-jp-docs-xplat.lock.yml` | `docs/xplat/src/content/en/**` on `vnext` |
13+
14+
The `.md` files are the human-editable source. The `.lock.yml` files are
15+
auto-generated and are what GitHub Actions actually executes. **Do not edit
16+
`.lock.yml` files directly.** After changing a workflow `.md`, run `gh aw compile`
17+
and commit the regenerated `.lock.yml` file(s) (and `actions-lock.json` if it changed).
18+
19+
## How to update a workflow
20+
21+
### Prerequisites
22+
23+
1. [GitHub CLI](https://cli.github.com/) installed
24+
2. The `gh-aw` extension installed:
25+
```bash
26+
gh extension install github/gh-aw
27+
```
28+
3. Authenticated with `gh auth login`
29+
30+
### Steps
31+
32+
1. Edit the `.md` file under `.github/workflows/`.
33+
2. Run from the repo root:
34+
```bash
35+
gh aw compile
36+
```
37+
This regenerates the corresponding `.lock.yml` file(s) and updates
38+
`.github/aw/actions-lock.json` if action SHAs changed.
39+
3. Commit **both** the `.md` and the `.lock.yml` together (plus
40+
`actions-lock.json` if it changed).
41+
4. Push to `vnext`.
42+
43+
For more information: https://github.github.com/gh-aw/introduction/overview/
44+
45+
## Required GitHub secrets
46+
47+
The following secrets must be configured at the repository level
48+
(Settings → Secrets and variables → Actions) for the agent workflows to
49+
run:
50+
51+
| Secret | Required | Purpose |
52+
|---|---|---|
53+
| `GITHUB_TOKEN` | Auto (built-in) | Standard token — nothing to provision |
54+
| `COPILOT_GITHUB_TOKEN` | **Yes** | Authenticates the Copilot CLI engine that drives the translation agent. Without it, the workflow fails immediately. |
55+
| `GH_AW_GITHUB_TOKEN` | Recommended | Elevated token the agent uses to create the translation PR. Falls back to `GITHUB_TOKEN` if unset. |
56+
| `GH_AW_GITHUB_MCP_SERVER_TOKEN` | Optional | Token for the embedded GitHub MCP read-only tools. Falls back to `GITHUB_TOKEN`. |
57+
| `GH_AW_CI_TRIGGER_TOKEN` | Optional | Triggers CI on the auto-created PR. Only needed if you want checks to run on bot PRs. |
58+
59+
These are the same secrets used in the old `igniteui-docfx` and
60+
`igniteui-xplat-docs` repositories.
61+

.github/aw/actions-lock.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"entries": {
3+
"actions/github-script@v9": {
4+
"repo": "actions/github-script",
5+
"version": "v9",
6+
"sha": "373c709c69115d41ff229c7e5df9f8788daa9553"
7+
},
8+
"actions/github-script@v9.0.0": {
9+
"repo": "actions/github-script",
10+
"version": "v9.0.0",
11+
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
12+
},
13+
"github/gh-aw-actions/setup-cli@v0.79.8": {
14+
"repo": "github/gh-aw-actions/setup-cli",
15+
"version": "v0.79.8",
16+
"sha": "c0338fef4749d08c21f8f975fb0e37efa17dda47"
17+
},
18+
"github/gh-aw-actions/setup@v0.79.8": {
19+
"repo": "github/gh-aw-actions/setup",
20+
"version": "v0.79.8",
21+
"sha": "c0338fef4749d08c21f8f975fb0e37efa17dda47"
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)