Migrate agentic workflows to gh-aw v1.4.0 (#194462)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Abílio Costa
2026-11-25 11:32:51 -05:00
committed by GitHub
co-authored by Claude Opus 5.5
parent fc1ecbcaf2
commit 30c523d065
6 changed files with 1816 additions and 733 deletions
+3 -3
View File
@@ -1,9 +1,9 @@
{
"entries": {
"github/gh-aw-actions/setup@v0.88.2": {
"github/gh-aw-actions/setup@v1.4.0": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.88.2",
"sha": "9271a1804551c0dc4fb0085a97979950aa2f8489"
"version": "v1.4.0",
"sha": "b907753c079ddd7d6829a0d8c24e02e818b4b45f"
}
}
}
+12 -7
View File
@@ -25,12 +25,12 @@ workflows:
- 'actions/setup-python@v7.1.0'
- 'actions/upload-artifact@v7.0.2'
'.github/workflows/check-requirements.lock.yml':
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
- 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1'
- 'actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333'
- 'actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3'
- 'actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1'
- 'actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9'
- 'github/gh-aw-actions@9271a1804551c0dc4fb0085a97979950aa2f8489'
- 'github/gh-aw-actions@b907753c079ddd7d6829a0d8c24e02e818b4b45f'
'.github/workflows/ci.yaml':
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
- 'actions/cache@v6.1.0'
@@ -63,13 +63,13 @@ workflows:
- 'dessant/lock-threads@v6.0.2'
'.github/workflows/quality-scale-reviewer-trigger.yml': []
'.github/workflows/quality-scale-reviewer.lock.yml':
- 'actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9'
- 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1'
- 'actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333'
- 'actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3'
- 'actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1'
- 'actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0'
- 'actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9'
- 'github/gh-aw-actions@9271a1804551c0dc4fb0085a97979950aa2f8489'
- 'github/gh-aw-actions@b907753c079ddd7d6829a0d8c24e02e818b4b45f'
'.github/workflows/restrict-task-creation.yml':
- 'actions/github-script@v9.0.0'
'.github/workflows/stale.yml':
@@ -163,6 +163,11 @@ dependencies:
commit: 'sha1-3a2844b7e9c422d3c10d287c895573f7108da1b3'
owner_id: 44036562
repo_id: 205262760
'actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1':
ref: 'v7.1.0'
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
owner_id: 44036562
repo_id: 189476904
'actions/setup-node@v7.1.0':
ref: 'v7.1.0'
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
@@ -291,9 +296,9 @@ dependencies:
commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066'
owner_id: 9919
repo_id: 259445878
'github/gh-aw-actions@9271a1804551c0dc4fb0085a97979950aa2f8489':
ref: 'v0.88.2'
commit: 'sha1-9271a1804551c0dc4fb0085a97979950aa2f8489'
'github/gh-aw-actions@b907753c079ddd7d6829a0d8c24e02e818b4b45f':
ref: 'v1.4.0'
commit: 'sha1-b907753c079ddd7d6829a0d8c24e02e818b4b45f'
owner_id: 9919
repo_id: 1156386970
'hadolint/hadolint-action@v3.5.0':
File diff suppressed because one or more lines are too long
+17 -17
View File
@@ -1,4 +1,6 @@
---
# PR-triggered runs have no fixed head branch, so the CTR-021 workflow_run branch filter cannot be satisfied.
strict: false
on:
workflow_run:
workflows: ["Check requirements (deterministic)"]
@@ -47,7 +49,7 @@ jobs:
steps:
- name: Download deterministic-results artifact
id: download
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: check-requirements-deterministic
path: /tmp/deterministic
@@ -58,33 +60,31 @@ jobs:
run: |
echo "skip=$(jq -r '.skip_aw' /tmp/deterministic/results.json)" >> "${GITHUB_OUTPUT}"
echo "pr_number=$(jq -r '.pr_number' /tmp/deterministic/results.json)" >> "${GITHUB_OUTPUT}"
verify_comment:
needs: [prepare, safe_outputs]
if: always() && github.event.workflow_run.conclusion == 'success' && needs.prepare.outputs.skip != 'true'
runs-on: ubuntu-latest
steps:
- name: Verify the agent posted a review comment
env:
COMMENT_ID: ${{ needs.safe_outputs.outputs.comment_id }}
run: |
if [ -z "${COMMENT_ID}" ]; then
echo "::error::Agent did not emit an add_comment safe-output; no review comment was posted to the PR."
exit 1
fi
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.id }}
cancel-in-progress: true
steps:
- name: Download deterministic-results artifact
if: github.event.workflow_run.conclusion == 'success'
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: check-requirements-deterministic
path: /tmp/gh-aw/deterministic
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
post-steps:
- name: Verify agent produced an add_comment safe-output
if: always() && github.event.workflow_run.conclusion == 'success'
run: |
OUTPUT=/tmp/gh-aw/agent_output.json
if [ ! -f "${OUTPUT}" ]; then
echo "::error::Agent output file ${OUTPUT} is missing; the agent did not run to completion."
exit 1
fi
if ! grep -q '"add_comment"' "${OUTPUT}"; then
echo "::error::Agent did not emit an add_comment safe-output; no review comment was posted to the PR."
echo "Agent output:"
cat "${OUTPUT}"
exit 1
fi
description: >
Resolves the deterministic-stage artifact's NEEDS_AGENT checks for changed
Python package requirements on PRs targeting the core repo, then posts the
File diff suppressed because one or more lines are too long
+16 -8
View File
@@ -1,4 +1,6 @@
---
# PR-triggered runs have no fixed head branch, so the CTR-021 workflow_run branch filter cannot be satisfied.
strict: false
name: quality-scale-reviewer
run-name: "quality-scale-reviewer: ${{ github.event.workflow_run.display_title || format('PR #{0}', inputs.pull_request_number) }}"
description: >
@@ -75,7 +77,7 @@ safe-outputs:
hide-older-comments: true
needs:
- prepare
# The conclusion job comments on the pull request when the credit budget skips a run.
# The credit_budget_notice job comments on the pull request when the credit budget skips a run.
report-failure-as-issue: ["!daily_ai_credits_exceeded"]
jobs:
prepare:
@@ -126,7 +128,7 @@ jobs:
echo "pr_number=$(jq '.[0]' <<< "${MATCHES}")" >> "${GITHUB_OUTPUT}"
- name: Set up Python
if: steps.pr.outputs.skip != 'true'
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version-file: ".python-version"
check-latest: true
@@ -184,17 +186,23 @@ jobs:
⏭️ The automated Integration Quality Scale review was skipped: this pull request ${SKIP_REASON}."
- name: Upload deterministic artifact
if: steps.prepare.outputs.skip != 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: quality-scale-reviewer-deterministic
path: deterministic
if-no-files-found: error
retention-days: 7
# The activation job evaluates the daily AI-credit budget but may not write,
# so the notice is posted from the conclusion job, which runs when the budget
# is exceeded and the agent is skipped.
conclusion:
pre-steps:
# and the conclusion job does not accept custom steps, so this job posts the
# notice when the budget is exceeded and the agent is skipped. gh-aw makes the
# agent job wait for every custom job, so the condition is on the step: a
# skipped job would skip the agent.
credit_budget_notice:
needs: [activation, prepare]
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Comment that the review was skipped by the daily AI-credit budget
if: needs.activation.outputs.daily_ai_credits_exceeded == 'true'
env:
@@ -223,7 +231,7 @@ concurrency:
job-discriminator: ${{ github.run_id }}
steps:
- name: Download deterministic artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: quality-scale-reviewer-deterministic
path: /tmp/gh-aw/agent