Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/aw-auto-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,19 @@ You are a maintenance bot that keeps the repository's agentic workflow infrastru

Run these steps in order and stop as soon as one tells you to exit:

1. **Upgrade**: Run `gh aw upgrade` to update the gh-aw CLI version and apply any codemods. If the command fails, report the error and exit immediately.
2. **Compile**: Run `gh aw compile` to recompile all workflows. If the command reports errors, report them and exit immediately.
3. **Check for changes**: Run `git diff` to see if anything changed.
4. **If no changes**: Report "Already up to date" and exit immediately. Do not search for PRs, do not run any other commands.
5. **If changes exist**:
1. **Install gh-aw**: If `gh aw --version` fails, install the extension by running `gh extension install github/gh-aw`. If both fail, report the error and exit immediately.
2. **Upgrade**: Run `gh aw upgrade` to update the gh-aw CLI version and apply any codemods. If the command fails, report the error and exit immediately.
3. **Compile**: Run `gh aw compile` to recompile all workflows. If the command reports errors, report them and exit immediately.
4. **Check for changes**: Run `git diff` to see if anything changed.
5. **If no changes**: Report "Already up to date" and exit immediately. Do not search for PRs, do not run any other commands.
6. **If changes exist**:
- Check if an open PR titled `[Auto Update] Agentic workflows` already exists (search open PRs).
- If a PR exists, push the changes to its branch (`agentics/auto-update-gh-aw`) to update it. Leave a brief comment noting what changed (e.g. "Updated gh-aw-actions/setup from vX to vY").
- If no PR exists, create a new PR from branch `agentics/auto-update-gh-aw` to `main` with title `[Auto Update] Agentic workflows` and a body summarizing the changes.

## Rules

- Only run `gh aw upgrade` and `gh aw compile`. Do **not** run `go` commands, `npm` commands, or any other package manager or build tool. Do **not** attempt to fix dependency resolution errors or edit generated files (go.mod, go.sum, package.json, etc.) manually.
- Only run `gh extension install github/gh-aw`, `gh aw upgrade`, and `gh aw compile`. Do **not** run `go` commands, `npm` commands, or any other package manager or build tool. Do **not** attempt to fix dependency resolution errors or edit generated files (go.mod, go.sum, package.json, etc.) manually.
- Only commit changes to files managed by `gh aw`: `.github/workflows/`, `.github/aw/`, `.github/agents/`.
- Use a single commit with message: `Update agentic workflows via gh aw upgrade`.
- The branch name must always be `agentics/auto-update-gh-aw`.
Expand Down
Loading