Skip to content

Commit b9a0dd9

Browse files
ci: automate gh-aw workflow source updates (#1699)
Adds a weekly (and manually triggerable) workflow that runs `gh aw update --create-pull-request`. For each agentic workflow with a `source:` pin (`accessibility-review`, `ci-doctor`, `repo-assist`), it pulls in upstream changes using a 3-way merge, recompiles the `.lock.yml` files, and opens a PR with the result. ### Why not Dependabot APM? Dependabot's `apm` ecosystem only updates `apm.yml` and `apm.lock.yaml`. It can't bump gh-aw `source:` pins or recompile lock files, so it doesn't solve the recompilation problem for these workflows. ### Token The workflow uses `BOT_PAT` rather than `GITHUB_TOKEN`, for two reasons: - `GITHUB_TOKEN` can't push changes under `.github/workflows/`. - PRs opened with `GITHUB_TOKEN` don't trigger CI. `BOT_PAT` must have `workflow` scope. Also rewords the Dependabot comment explaining why `github/gh-aw-actions/*` is ignored. ### Validation - `actionlint` passes. - The workflow has not been run yet. After merge, trigger it with `workflow_dispatch` to verify.
1 parent f9e2960 commit b9a0dd9

2 files changed

Lines changed: 33 additions & 2 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ updates:
3737
schedule:
3838
interval: "weekly"
3939
ignore:
40-
# gh-aw actions must match the compiler version that generated the .lock.yml files.
41-
# Upgrade them with `gh aw upgrade` (which recompiles) instead.
40+
# gh-aw action pins are compiler-managed and updated with workflow source updates/recompilation.
4241
- dependency-name: "github/gh-aw-actions/*"
4342

4443
- package-ecosystem: "npm"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update Agentic Workflows
2+
3+
on:
4+
schedule:
5+
- cron: "17 17 * * 1"
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: update-agentic-workflows
13+
cancel-in-progress: false
14+
15+
jobs:
16+
update:
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 15
19+
steps:
20+
# GITHUB_TOKEN cannot push .github/workflows changes, and PRs it opens do not trigger CI.
21+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
22+
with:
23+
token: ${{ secrets.BOT_PAT }}
24+
25+
- uses: github/gh-aw/actions/setup-cli@399a445fe2d8926c616b54b1b82a16b5b2be4445 # v1.2.2
26+
with:
27+
version: latest
28+
29+
- name: Update workflow sources and compile
30+
env:
31+
GH_TOKEN: ${{ secrets.BOT_PAT }}
32+
run: gh aw update --create-pull-request

0 commit comments

Comments
 (0)