Skip to content

Commit 7089449

Browse files
authored
Merge pull request #7 from githubnext/copilot/investigate-fix-ci-errors
Fix agentic workflow CI failures
2 parents 8b7688b + 80e3d08 commit 7089449

7 files changed

Lines changed: 139 additions & 226 deletions

File tree

.github/agents/agentic-workflows.agent.md

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ This is a **dispatcher agent** that routes your request to the appropriate speci
1919
- **Creating shared components**: Routes to `create-shared-agentic-workflow` prompt
2020
- **Fixing Dependabot PRs**: Routes to `dependabot` prompt — use this when Dependabot opens PRs that modify generated manifest files (`.github/workflows/package.json`, `.github/workflows/requirements.txt`, `.github/workflows/go.mod`). Never merge those PRs directly; instead update the source `.md` files and rerun `gh aw compile --dependabot` to bundle all fixes
2121
- **Analyzing test coverage**: Routes to `test-coverage` prompt — consult this whenever the workflow reads, analyzes, or reports on test coverage data from PRs or CI runs
22-
- **CLI commands and triggering workflows**: Routes to `cli-commands` guide — consult this whenever the user asks how to run, compile, debug, or manage workflows from the command line, or when they need the MCP tool equivalent of a `gh aw` command
2322

2423
Workflows may optionally include:
2524

@@ -130,17 +129,6 @@ When you interact with this agent, it will:
130129
- "Analyze coverage trends over time"
131130
- "Add a coverage gate that blocks PRs below a threshold"
132131

133-
### CLI Commands Reference
134-
**Load when**: The user asks how to run, compile, debug, or manage workflows from the command line; needs the MCP tool equivalent of a `gh aw` command; or is in a restricted environment (e.g., Copilot Cloud) without direct CLI access.
135-
136-
**Reference file**: https://github.com/github/gh-aw/blob/main/.github/aw/cli-commands.md
137-
138-
**Use cases**:
139-
- "How do I trigger workflow X on the main branch?"
140-
- "What's the MCP equivalent of `gh aw logs`?"
141-
- "I'm in Copilot Cloud — how do I compile a workflow?"
142-
- "Show me all available gh aw commands"
143-
144132
## Instructions
145133

146134
When a user interacts with you:
@@ -159,10 +147,6 @@ gh aw init
159147
# Generate the lock file for a workflow
160148
gh aw compile [workflow-name]
161149

162-
# Trigger a workflow on demand (preferred over gh workflow run)
163-
gh aw run <workflow-name> # interactive input collection
164-
gh aw run <workflow-name> --ref main # run on a specific branch
165-
166150
# Debug workflow runs
167151
gh aw logs [workflow-name]
168152
gh aw audit <run-id>
@@ -190,7 +174,4 @@ gh aw compile --validate
190174
- Workflows must be compiled to `.lock.yml` files before running in GitHub Actions
191175
- **Bash tools are enabled by default** - Don't restrict bash commands unnecessarily since workflows are sandboxed by the AWF
192176
- Follow security best practices: minimal permissions, explicit network access, no template injection
193-
- **Network configuration**: Use ecosystem identifiers (`node`, `python`, `go`, etc.) or explicit FQDNs in `network.allowed`. Bare shorthands like `npm` or `pypi` are **not** valid. See https://github.com/github/gh-aw/blob/main/.github/aw/network.md for the full list of valid ecosystem identifiers and domain patterns.
194177
- **Single-file output**: When creating a workflow, produce exactly **one** workflow `.md` file. Do not create separate documentation files (architecture docs, runbooks, usage guides, etc.). If documentation is needed, add a brief `## Usage` section inside the workflow file itself.
195-
- **Triggering runs**: Always use `gh aw run <workflow-name>` to trigger a workflow on demand — not `gh workflow run <file>.lock.yml`. `gh aw run` handles workflow resolution by short name, input parsing and validation, and correct run-tracking for agentic workflows. Use `--ref <branch>` to run on a specific branch.
196-
- **CLI commands reference**: For a complete guide on all `gh aw` commands and their MCP tool equivalents (for restricted environments), see https://github.com/github/gh-aw/blob/main/.github/aw/cli-commands.md
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
description: "Agentic workflow recompilation: always recompile after changing workflow files"
3+
---
4+
5+
# Agentic Workflows
6+
7+
After modifying any `.md` workflow file under `.github/workflows/`, always
8+
recompile both agentic workflows and APM integration files before committing:
9+
10+
```bash
11+
gh aw compile
12+
apm compile
13+
```
14+
15+
Commit the regenerated `.lock.yml` and integration files together with your
16+
changes. The CI `APM Self-Check` job will fail if generated files are stale.

.github/workflows/agentics-maintenance.yml

Lines changed: 31 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
persist-credentials: false
105105

106106
- name: Setup Scripts
107-
uses: ./actions/setup
107+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
108108
with:
109109
destination: ${{ runner.temp }}/gh-aw/actions
110110

@@ -149,7 +149,7 @@ jobs:
149149
persist-credentials: false
150150

151151
- name: Setup Scripts
152-
uses: ./actions/setup
152+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
153153
with:
154154
destination: ${{ runner.temp }}/gh-aw/actions
155155

@@ -178,7 +178,7 @@ jobs:
178178
persist-credentials: false
179179

180180
- name: Setup Scripts
181-
uses: ./actions/setup
181+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
182182
with:
183183
destination: ${{ runner.temp }}/gh-aw/actions
184184

@@ -192,21 +192,17 @@ jobs:
192192
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
193193
await main();
194194
195-
- name: Setup Go
196-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
195+
- name: Install gh-aw
196+
uses: github/gh-aw/actions/setup-cli@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
197197
with:
198-
go-version-file: go.mod
199-
cache: true
200-
201-
- name: Build gh-aw
202-
run: make build
198+
version: v0.72.1
203199

204200
- name: Run operation
205201
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
206202
env:
207203
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
208204
GH_AW_OPERATION: ${{ inputs.operation }}
209-
GH_AW_CMD_PREFIX: ./gh-aw
205+
GH_AW_CMD_PREFIX: gh aw
210206
with:
211207
github-token: ${{ secrets.GITHUB_TOKEN }}
212208
script: |
@@ -234,7 +230,7 @@ jobs:
234230
persist-credentials: false
235231

236232
- name: Setup Scripts
237-
uses: ./actions/setup
233+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
238234
with:
239235
destination: ${{ runner.temp }}/gh-aw/actions
240236

@@ -280,7 +276,7 @@ jobs:
280276
persist-credentials: false
281277

282278
- name: Setup Scripts
283-
uses: ./actions/setup
279+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
284280
with:
285281
destination: ${{ runner.temp }}/gh-aw/actions
286282

@@ -324,7 +320,7 @@ jobs:
324320
persist-credentials: false
325321

326322
- name: Setup Scripts
327-
uses: ./actions/setup
323+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
328324
with:
329325
destination: ${{ runner.temp }}/gh-aw/actions
330326

@@ -338,19 +334,15 @@ jobs:
338334
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
339335
await main();
340336
341-
- name: Setup Go
342-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
337+
- name: Install gh-aw
338+
uses: github/gh-aw/actions/setup-cli@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
343339
with:
344-
go-version-file: go.mod
345-
cache: true
346-
347-
- name: Build gh-aw
348-
run: make build
340+
version: v0.72.1
349341

350342
- name: Create missing labels
351343
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
352344
env:
353-
GH_AW_CMD_PREFIX: ./gh-aw
345+
GH_AW_CMD_PREFIX: gh aw
354346
with:
355347
github-token: ${{ secrets.GITHUB_TOKEN }}
356348
script: |
@@ -374,7 +366,7 @@ jobs:
374366
persist-credentials: false
375367

376368
- name: Setup Scripts
377-
uses: ./actions/setup
369+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
378370
with:
379371
destination: ${{ runner.temp }}/gh-aw/actions
380372

@@ -388,14 +380,10 @@ jobs:
388380
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
389381
await main();
390382
391-
- name: Setup Go
392-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
383+
- name: Install gh-aw
384+
uses: github/gh-aw/actions/setup-cli@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
393385
with:
394-
go-version-file: go.mod
395-
cache: true
396-
397-
- name: Build gh-aw
398-
run: make build
386+
version: v0.72.1
399387

400388
- name: Restore activity report logs cache
401389
id: activity_report_logs_cache
@@ -411,7 +399,7 @@ jobs:
411399
shell: bash
412400
env:
413401
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
414-
GH_AW_CMD_PREFIX: ./gh-aw
402+
GH_AW_CMD_PREFIX: gh aw
415403
run: |
416404
${GH_AW_CMD_PREFIX} logs \
417405
--repo "${{ github.repository }}" \
@@ -482,7 +470,7 @@ jobs:
482470
persist-credentials: false
483471

484472
- name: Setup Scripts
485-
uses: ./actions/setup
473+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
486474
with:
487475
destination: ${{ runner.temp }}/gh-aw/actions
488476

@@ -519,7 +507,7 @@ jobs:
519507
persist-credentials: false
520508

521509
- name: Setup Scripts
522-
uses: ./actions/setup
510+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
523511
with:
524512
destination: ${{ runner.temp }}/gh-aw/actions
525513

@@ -533,19 +521,15 @@ jobs:
533521
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
534522
await main();
535523
536-
- name: Setup Go
537-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
524+
- name: Install gh-aw
525+
uses: github/gh-aw/actions/setup-cli@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
538526
with:
539-
go-version-file: go.mod
540-
cache: true
541-
542-
- name: Build gh-aw
543-
run: make build
527+
version: v0.72.1
544528

545529
- name: Validate workflows and file issue on findings
546530
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
547531
env:
548-
GH_AW_CMD_PREFIX: ./gh-aw
532+
GH_AW_CMD_PREFIX: gh aw
549533
with:
550534
github-token: ${{ secrets.GITHUB_TOKEN }}
551535
script: |
@@ -569,22 +553,18 @@ jobs:
569553
with:
570554
persist-credentials: false
571555

572-
- name: Setup Go
573-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
556+
- name: Install gh-aw
557+
uses: github/gh-aw/actions/setup-cli@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
574558
with:
575-
go-version-file: go.mod
576-
cache: true
577-
578-
- name: Build gh-aw
579-
run: make build
559+
version: v0.72.1
580560

581561
- name: Compile workflows
582562
run: |
583-
./gh-aw compile --validate --validate-images --verbose
563+
gh aw compile --validate --validate-images --verbose
584564
echo "✓ All workflows compiled successfully"
585565
586566
- name: Setup Scripts
587-
uses: ./actions/setup
567+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
588568
with:
589569
destination: ${{ runner.temp }}/gh-aw/actions
590570

@@ -616,7 +596,7 @@ jobs:
616596
node-version: '22'
617597

618598
- name: Setup Scripts
619-
uses: ./actions/setup
599+
uses: github/gh-aw/actions/setup@4a32129491598c66908107001a88d8e5cad631c8 # v0.72.1
620600
with:
621601
destination: ${{ runner.temp }}/gh-aw/actions
622602

0 commit comments

Comments
 (0)