Skip to content

Commit 971630b

Browse files
Copilotlpcox
andauthored
fix: check binary existence for gh-aw install instead of gh aw --version (#2183)
* fix: check binary existence for gh-aw install instead of gh aw --version Newer gh CLI versions return exit code 0 for 'gh aw --version' even when the extension is not installed (showing 'available as official extension' message). This caused the install step to be silently skipped, leading to a 'Failed to find gh-aw binary for MCP server' error. Fix shared/mcp/gh-aw.md to check binary existence directly and recompile all affected lock files. * fix: use command -v and -executable checks for gh-aw binary detection Use 'command -v' instead of 'which', add '-executable' to find, and check '-x' instead of '-f' to ensure only executable binaries are treated as installed. Also restore actions-lock.json entries that map gh-aw-actions/setup tag to commit SHA so lock file manifests use proper commit SHAs instead of tag names. Recompile all workflows with v0.69.3. Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
1 parent 9318fdb commit 971630b

33 files changed

Lines changed: 782 additions & 689 deletions

.github/aw/actions-lock.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,6 @@
4040
"version": "v4.0.0",
4141
"sha": "4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd"
4242
},
43-
"github/gh-aw-actions/setup-cli@v0.69.3": {
44-
"repo": "github/gh-aw-actions/setup-cli",
45-
"version": "v0.69.3",
46-
"sha": "006ffd856b868b71df342dbe0ba082a963249b31"
47-
},
48-
"github/gh-aw-actions/setup@v0.69.3": {
49-
"repo": "github/gh-aw-actions/setup",
50-
"version": "v0.69.3",
51-
"sha": "006ffd856b868b71df342dbe0ba082a963249b31"
52-
},
5343
"github/gh-aw/actions/setup@v0.69.3": {
5444
"repo": "github/gh-aw/actions/setup",
5545
"version": "v0.69.3",
@@ -59,6 +49,16 @@
5949
"repo": "softprops/action-gh-release",
6050
"version": "v3.0.0",
6151
"sha": "b4309332981a82ec1c5618f44dd2e27cc8bfbfda"
52+
},
53+
"github/gh-aw-actions/setup@v0.69.3": {
54+
"repo": "github/gh-aw-actions/setup",
55+
"version": "v0.69.3",
56+
"sha": "006ffd856b868b71df342dbe0ba082a963249b31"
57+
},
58+
"github/gh-aw-actions/setup-cli@v0.69.3": {
59+
"repo": "github/gh-aw-actions/setup-cli",
60+
"version": "v0.69.3",
61+
"sha": "006ffd856b868b71df342dbe0ba082a963249b31"
6262
}
6363
},
6464
"containers": {

.github/workflows/agentics-maintenance.yml

Lines changed: 116 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
1313
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
1414
#
15-
# This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.68.7). DO NOT EDIT.
15+
# This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.69.3). DO NOT EDIT.
1616
#
1717
# To regenerate this workflow, run:
1818
# gh aw compile
@@ -50,6 +50,8 @@ on:
5050
- 'upgrade'
5151
- 'safe_outputs'
5252
- 'create_labels'
53+
- 'activity_report'
54+
- 'close_agentic_workflows_issues'
5355
- 'clean_cache_memories'
5456
- 'validate'
5557
run_url:
@@ -60,7 +62,7 @@ on:
6062
workflow_call:
6163
inputs:
6264
operation:
63-
description: 'Optional maintenance operation to run (disable, enable, update, upgrade, safe_outputs, create_labels, clean_cache_memories, validate)'
65+
description: 'Optional maintenance operation to run (disable, enable, update, upgrade, safe_outputs, create_labels, activity_report, close_agentic_workflows_issues, clean_cache_memories, validate)'
6466
required: false
6567
type: string
6668
default: ''
@@ -89,12 +91,12 @@ jobs:
8991
pull-requests: write
9092
steps:
9193
- name: Setup Scripts
92-
uses: github/gh-aw-actions/setup@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
94+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
9395
with:
9496
destination: ${{ runner.temp }}/gh-aw/actions
9597

9698
- name: Close expired discussions
97-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
99+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
98100
with:
99101
script: |
100102
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
@@ -103,7 +105,7 @@ jobs:
103105
await main();
104106
105107
- name: Close expired issues
106-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
108+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
107109
with:
108110
script: |
109111
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
@@ -112,7 +114,7 @@ jobs:
112114
await main();
113115
114116
- name: Close expired pull requests
115-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
117+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
116118
with:
117119
script: |
118120
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
@@ -127,12 +129,12 @@ jobs:
127129
actions: write
128130
steps:
129131
- name: Setup Scripts
130-
uses: github/gh-aw-actions/setup@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
132+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
131133
with:
132134
destination: ${{ runner.temp }}/gh-aw/actions
133135

134136
- name: Cleanup outdated cache-memory entries
135-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
137+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
136138
with:
137139
script: |
138140
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
@@ -141,7 +143,7 @@ jobs:
141143
await main();
142144
143145
run_operation:
144-
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation != '' && inputs.operation != 'safe_outputs' && inputs.operation != 'create_labels' && inputs.operation != 'clean_cache_memories' && inputs.operation != 'validate' && (!(github.event.repository.fork)) }}
146+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation != '' && inputs.operation != 'safe_outputs' && inputs.operation != 'create_labels' && inputs.operation != 'activity_report' && inputs.operation != 'close_agentic_workflows_issues' && inputs.operation != 'clean_cache_memories' && inputs.operation != 'validate' && (!(github.event.repository.fork)) }}
145147
runs-on: ubuntu-slim
146148
permissions:
147149
actions: write
@@ -156,12 +158,12 @@ jobs:
156158
persist-credentials: false
157159

158160
- name: Setup Scripts
159-
uses: github/gh-aw-actions/setup@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
161+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
160162
with:
161163
destination: ${{ runner.temp }}/gh-aw/actions
162164

163165
- name: Check admin/maintainer permissions
164-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
166+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
165167
with:
166168
github-token: ${{ secrets.GITHUB_TOKEN }}
167169
script: |
@@ -171,12 +173,12 @@ jobs:
171173
await main();
172174
173175
- name: Install gh-aw
174-
uses: github/gh-aw-actions/setup-cli@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
176+
uses: github/gh-aw-actions/setup-cli@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
175177
with:
176-
version: v0.68.7
178+
version: v0.69.3
177179

178180
- name: Run operation
179-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
181+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
180182
env:
181183
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
182184
GH_AW_OPERATION: ${{ inputs.operation }}
@@ -213,12 +215,12 @@ jobs:
213215
persist-credentials: false
214216

215217
- name: Setup Scripts
216-
uses: github/gh-aw-actions/setup@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
218+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
217219
with:
218220
destination: ${{ runner.temp }}/gh-aw/actions
219221

220222
- name: Check admin/maintainer permissions
221-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
223+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
222224
with:
223225
github-token: ${{ secrets.GITHUB_TOKEN }}
224226
script: |
@@ -228,7 +230,7 @@ jobs:
228230
await main();
229231
230232
- name: Apply Safe Outputs
231-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
233+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
232234
env:
233235
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
234236
GH_AW_RUN_URL: ${{ inputs.run_url }}
@@ -257,12 +259,12 @@ jobs:
257259
persist-credentials: false
258260

259261
- name: Setup Scripts
260-
uses: github/gh-aw-actions/setup@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
262+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
261263
with:
262264
destination: ${{ runner.temp }}/gh-aw/actions
263265

264266
- name: Check admin/maintainer permissions
265-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
267+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
266268
with:
267269
github-token: ${{ secrets.GITHUB_TOKEN }}
268270
script: |
@@ -272,12 +274,12 @@ jobs:
272274
await main();
273275
274276
- name: Install gh-aw
275-
uses: github/gh-aw-actions/setup-cli@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
277+
uses: github/gh-aw-actions/setup-cli@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
276278
with:
277-
version: v0.68.7
279+
version: v0.69.3
278280

279281
- name: Create missing labels
280-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
282+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
281283
env:
282284
GH_AW_CMD_PREFIX: gh aw
283285
with:
@@ -288,6 +290,93 @@ jobs:
288290
const { main } = require('${{ runner.temp }}/gh-aw/actions/create_labels.cjs');
289291
await main();
290292
293+
activity_report:
294+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'activity_report' && (!(github.event.repository.fork)) }}
295+
runs-on: ubuntu-slim
296+
timeout-minutes: 120
297+
permissions:
298+
actions: read
299+
contents: read
300+
issues: write
301+
steps:
302+
- name: Checkout repository
303+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
304+
with:
305+
persist-credentials: false
306+
307+
- name: Setup Scripts
308+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
309+
with:
310+
destination: ${{ runner.temp }}/gh-aw/actions
311+
312+
- name: Check admin/maintainer permissions
313+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
314+
with:
315+
github-token: ${{ secrets.GITHUB_TOKEN }}
316+
script: |
317+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
318+
setupGlobals(core, github, context, exec, io, getOctokit);
319+
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
320+
await main();
321+
322+
- name: Install gh-aw
323+
uses: github/gh-aw-actions/setup-cli@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
324+
with:
325+
version: v0.69.3
326+
327+
- name: Cache activity report logs
328+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
329+
with:
330+
path: ./.cache/gh-aw/activity-report-logs
331+
key: ${{ runner.os }}-activity-report-logs-${{ github.repository }}-${{ github.ref_name }}-${{ github.run_id }}
332+
restore-keys: |
333+
${{ runner.os }}-activity-report-logs-${{ github.repository }}-
334+
${{ runner.os }}-activity-report-logs-
335+
- name: Generate agentic workflow activity report
336+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
337+
env:
338+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
339+
GH_AW_CMD_PREFIX: gh aw
340+
GH_AW_ACTIVITY_REPORT_OUTPUT_DIR: ./.cache/gh-aw/activity-report-logs
341+
with:
342+
github-token: ${{ secrets.GITHUB_TOKEN }}
343+
script: |
344+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
345+
setupGlobals(core, github, context, exec, io, getOctokit);
346+
const { main } = require('${{ runner.temp }}/gh-aw/actions/run_activity_report.cjs');
347+
await main();
348+
349+
close_agentic_workflows_issues:
350+
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'close_agentic_workflows_issues' && (!(github.event.repository.fork)) }}
351+
runs-on: ubuntu-slim
352+
permissions:
353+
issues: write
354+
steps:
355+
- name: Setup Scripts
356+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
357+
with:
358+
destination: ${{ runner.temp }}/gh-aw/actions
359+
360+
- name: Check admin/maintainer permissions
361+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
362+
with:
363+
github-token: ${{ secrets.GITHUB_TOKEN }}
364+
script: |
365+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
366+
setupGlobals(core, github, context, exec, io, getOctokit);
367+
const { main } = require('${{ runner.temp }}/gh-aw/actions/check_team_member.cjs');
368+
await main();
369+
370+
- name: Close no-repro agentic-workflows issues
371+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
372+
with:
373+
github-token: ${{ secrets.GITHUB_TOKEN }}
374+
script: |
375+
const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs');
376+
setupGlobals(core, github, context, exec, io, getOctokit);
377+
const { main } = require('${{ runner.temp }}/gh-aw/actions/close_agentic_workflows_issues.cjs');
378+
await main();
379+
291380
validate_workflows:
292381
if: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call') && inputs.operation == 'validate' && (!(github.event.repository.fork)) }}
293382
runs-on: ubuntu-latest
@@ -301,12 +390,12 @@ jobs:
301390
persist-credentials: false
302391

303392
- name: Setup Scripts
304-
uses: github/gh-aw-actions/setup@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
393+
uses: github/gh-aw-actions/setup@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
305394
with:
306395
destination: ${{ runner.temp }}/gh-aw/actions
307396

308397
- name: Check admin/maintainer permissions
309-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
398+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
310399
with:
311400
github-token: ${{ secrets.GITHUB_TOKEN }}
312401
script: |
@@ -316,12 +405,12 @@ jobs:
316405
await main();
317406
318407
- name: Install gh-aw
319-
uses: github/gh-aw-actions/setup-cli@f52802884d655622f0a2dfd6d6a2250983c95523 # v0.68.7
408+
uses: github/gh-aw-actions/setup-cli@006ffd856b868b71df342dbe0ba082a963249b31 # v0.69.3
320409
with:
321-
version: v0.68.7
410+
version: v0.69.3
322411

323412
- name: Validate workflows and file issue on findings
324-
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
413+
uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9
325414
env:
326415
GH_AW_CMD_PREFIX: gh aw
327416
with:

0 commit comments

Comments
 (0)