Skip to content

Commit ba594eb

Browse files
Copilotpelikhan
andcommitted
Move setup instructions to front matter steps
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent e7a30f4 commit ba594eb

1 file changed

Lines changed: 30 additions & 14 deletions

File tree

workflows/maintainer.md

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,41 +21,57 @@ tools:
2121

2222
timeout_minutes: 30
2323

24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Install gh CLI
29+
run: |
30+
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
31+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
32+
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
33+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
34+
&& sudo apt update \
35+
&& sudo apt install gh -y
36+
37+
- name: Install gh-aw extension
38+
run: |
39+
gh extension install githubnext/gh-aw || gh extension upgrade githubnext/gh-aw
40+
env:
41+
GH_TOKEN: ${{ github.token }}
42+
43+
- name: Verify gh-aw installation
44+
run: gh aw version
45+
env:
46+
GH_TOKEN: ${{ github.token }}
47+
2448
---
2549

2650
# Agentic Workflow Maintainer
2751

2852
Your name is "${{ github.workflow }}". Your job is to upgrade the workflows in the GitHub repository `${{ github.repository }}` to the latest version of gh-aw.
2953

30-
## Steps to follow:
54+
## Instructions
3155

3256
1. **Fetch the latest gh-aw changes**:
3357
- Use the GitHub tools to fetch the CHANGELOG.md or release notes from the `githubnext/gh-aw` repository
3458
- Review and understand the interesting changes, breaking changes, and new features in the latest version
3559
- Pay special attention to any migration guides or upgrade instructions
3660

37-
2. **Install the latest gh-aw CLI extension**:
38-
- Run `gh extension install githubnext/gh-aw || gh extension upgrade githubnext/gh-aw` to install or upgrade to the latest version
39-
- Verify the installation by running `gh aw version` to check the current version
40-
41-
3. **Check the current workflows**:
42-
- List all workflow markdown files in the `workflows/` directory
43-
- Understand which workflows need to be compiled
44-
45-
4. **Attempt to recompile the workflows**:
61+
2. **Attempt to recompile the workflows**:
4662
- Clean up any existing `.lock.yml` files: `find workflows -name "*.lock.yml" -type f -delete`
4763
- Run `gh aw compile --validate` on each workflow file in the `workflows/` directory
4864
- Note any compilation errors or warnings
4965

50-
5. **Fix compilation errors if they occur**:
66+
3. **Fix compilation errors if they occur**:
5167
- If there are compilation errors, analyze them carefully
5268
- Review the gh-aw changelog and new documentation you fetched earlier
5369
- Identify what changes are needed in the workflow files to make them compatible with the new version
5470
- Make the necessary changes to the workflow markdown files to fix the errors
5571
- Re-run `gh aw compile --validate` to verify the fixes work
5672
- Iterate until all workflows compile successfully or you've exhausted reasonable fix attempts
5773

58-
6. **Create appropriate outputs**:
74+
4. **Create appropriate outputs**:
5975
- **If all workflows compile successfully**: Create a pull request with the title "Upgrade workflows to latest gh-aw version" containing:
6076
- All updated workflow files
6177
- Any generated `.lock.yml` files
@@ -68,9 +84,9 @@ Your name is "${{ github.workflow }}". Your job is to upgrade the workflows in t
6884
- Links to relevant sections of the gh-aw changelog or documentation
6985
- The version of gh-aw you were trying to upgrade to
7086

71-
## Important notes:
87+
## Important notes
88+
- The gh-aw CLI extension has already been installed and is available for use
7289
- Always check the gh-aw changelog first to understand breaking changes
7390
- Test each fix by running `gh aw compile --validate` before moving to the next error
7491
- Include context and reasoning in your PR or issue descriptions
75-
- If you create a PR, make sure it includes all necessary changes for the workflows to compile
7692

0 commit comments

Comments
 (0)