Update prompts to use upload-asset instead of upload-artifact for image uploads#26507
Update prompts to use upload-asset instead of upload-artifact for image uploads#26507
Conversation
…upload_asset Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4c01c816-e5bc-4b7b-a78c-555bf81af5e0 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates agentic workflow prompts and generated workflow lockfiles to use upload-asset (safe output upload_asset) for image/chart/screenshot uploads instead of relying on upload-artifact patterns.
Changes:
- Updated multiple workflow instruction markdown files to recommend calling
upload_assetwith absolute image paths and embedding returned asset URLs. - Updated multiple compiled workflow lockfiles to configure
upload_asset, propagateGH_AW_ASSETS_*env vars, and add anupload_assetspublication job. - Updated shared documentation to reframe
upload-artifactas best for run-scoped deliverables vsupload-assetfor embeddable images.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/weekly-issue-summary.lock.yml | Adds upload_asset safe output config + upload_assets job; updates prompts/env to support asset publication. |
| .github/workflows/weekly-editors-health-check.md | Switches screenshot upload guidance from artifacts to assets and updates safe-outputs config. |
| .github/workflows/unbloat-docs.md | Updates screenshot upload instructions to use upload_asset with absolute paths and asset URLs. |
| .github/workflows/shared/trending-charts-simple.md | Updates chart upload section to use upload_asset and embed asset URLs. |
| .github/workflows/shared/safe-output-upload-artifact.md | Updates guidance to prefer upload_asset for images while retaining artifact embedding info. |
| .github/workflows/shared/python-dataviz.md | Switches safe-outputs config and instructions to upload_asset for charts/images. |
| .github/workflows/python-data-charts.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/portfolio-analyst.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/org-health-report.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/docs-noob-tester.md | Updates screenshot upload instructions to call upload_asset directly and report asset URLs. |
| .github/workflows/docs-noob-tester.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/daily-repo-chronicle.md | Updates chart upload + embedding placeholders from artifact URLs to asset URLs. |
| .github/workflows/daily-repo-chronicle.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/daily-performance-summary.md | Updates chart upload instructions and embeds to use asset URLs. |
| .github/workflows/daily-news.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/daily-integrity-analysis.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/daily-firewall-report.md | Updates chart upload instructions and embeds to use asset URLs. |
| .github/workflows/daily-firewall-report.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/copilot-token-audit.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/copilot-session-insights.lock.yml | Adds upload_asset config + upload_assets publication job and env wiring in compiled workflow. |
| .github/workflows/audit-workflows.md | Switches chart upload instructions to upload_asset and asset URL embedding. |
| .github/workflows/api-consumption-report.md | Rewrites chart upload step to call upload_asset with absolute paths and embed asset URLs. |
| .github/aw/github-agentic-workflows.md | Updates docs to recommend upload-asset for embeddable images and upload-artifact for temporary deliverables. |
| .github/aw/charts.md | Updates chart workflow examples to configure upload-asset rather than artifact uploads. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (11)
.github/workflows/copilot-session-insights.lock.yml:1455
contents: writeis granted to this job too. Please reduce tocontents: readunless it must write to the repo; keep write access limited to the asset-publication job to minimize token scope.
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/python-data-charts.lock.yml:1323
contents: writeis granted for this job as well. If it doesn’t directly write to the repo, consider reducing tocontents: readand leaving write access only onupload_assets.
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/org-health-report.lock.yml:1254
- This job’s permissions include
contents: write. If it isn’t responsible for publishing assets (git push), consider reverting tocontents: readand limiting write access toupload_assetsonly.
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/docs-noob-tester.lock.yml:1203
contents: writeis enabled for this job as well. Consider reducing tocontents: readunless this job actually performs repository writes (publishing assets should be the only place that requires write access).
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/daily-news.lock.yml:1513
contents: writeis enabled here as well. Unless this job needs to push commits (vs. relying onupload_assets), reduce it back tocontents: readto adhere to least-privilege.
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/daily-repo-chronicle.lock.yml:1269
contents: writeis granted to this job. Unless this job performs git pushes/commits, it should keepcontents: readand let the separateupload_assetsjob handle repo writes.
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/weekly-issue-summary.lock.yml:1224
- This job also has
contents: writeenabled. Unless it performs repository writes (git pushes/commits), consider reverting tocontents: readand keeping write permission scoped to theupload_assetsjob only.
.github/workflows/portfolio-analyst.lock.yml:1349 contents: writeis enabled for this job too. Unless this job performs repository writes itself, keepcontents: readand restrict write permissions to the dedicatedupload_assetsjob that publishes the assets branch.
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/daily-integrity-analysis.lock.yml:1367
contents: writeis also granted to this job. Unless it needs to push commits/branches, prefercontents: readand keep write permission isolated to the asset-publication job.
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/daily-firewall-report.lock.yml:1350
contents: writeis granted for this job too. Please reduce tocontents: readunless this job itself performs repository writes; keep write access scoped toupload_assetsfor least privilege.
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
.github/workflows/copilot-token-audit.lock.yml:1465
contents: writeis enabled for this job as well. Consider reverting tocontents: readunless this job needs to write to the repository; limit write access to theupload_assetsjob for least privilege.
if: (!cancelled()) && needs.agent.result != 'skipped' && needs.detection.result == 'success'
runs-on: ubuntu-slim
permissions:
contents: write
discussions: write
issues: write
- Files reviewed: 34/34 changed files
- Comments generated: 12
| - Allowed: PNG, JPG, SVG files | ||
| - Retention: 30 days |
There was a problem hiding this comment.
The “Asset Upload” summary bullets still mention a 30-day retention and omit .jpeg, which doesn’t match upload-asset semantics (assets are persisted on an assets branch rather than expiring like artifacts). Please remove/clarify the retention bullet and ensure the allowed extensions list matches the configured allowed-exts (includes .jpeg).
| - Allowed: PNG, JPG, SVG files | |
| - Retention: 30 days | |
| - Allowed: PNG, JPG, JPEG, SVG files | |
| - Persistence: stored as persistent assets (not 30-day artifacts) |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job’s permissions were changed to contents: write. Unless this job is actually pushing commits/branches, consider reverting to contents: read and limiting contents: write to the upload_assets job that publishes the assets branch, to reduce token scope.
This issue also appears on line 1319 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
contents: write was added here. If this job doesn’t push commits/branches (and publishing is handled in the dedicated upload_assets job), consider keeping contents: read and limiting write access to only the asset-publication job to follow least privilege.
This issue also appears on line 1345 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job’s permissions were broadened to contents: write. If it doesn’t push to the repo directly, prefer contents: read and confine write permissions to the upload_assets job that publishes the assets branch.
This issue also appears on line 1199 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job now has contents: write. If repository writes only happen in upload_assets, consider reverting this job back to contents: read to minimize token scope.
This issue also appears on line 1264 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job now has contents: write. If the repository write is only for publishing assets, consider reverting to contents: read here and limiting write permissions to the upload_assets job.
This issue also appears on line 1345 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job now requests contents: write. If it only creates discussions/issues and does not publish assets itself, revert to contents: read and keep contents: write scoped to the upload_assets job that performs the git push.
This issue also appears on line 1249 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job’s contents permission was elevated to write. If it doesn’t directly push commits/branches, keep contents: read here and scope contents: write to the asset publication job only.
This issue also appears on line 1460 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job now requests contents: write. If the only repository writes are for publishing assets, consider keeping this job at contents: read and restricting contents: write to the upload_assets job.
This issue also appears on line 1509 of the same file.
| contents: write | |
| contents: read |
| runs-on: ubuntu-slim | ||
| permissions: | ||
| contents: read | ||
| contents: write |
There was a problem hiding this comment.
This job now requests contents: write. If it only processes safe outputs / posts discussions and doesn’t push commits, consider reverting to contents: read and reserving write permissions for the upload_assets job.
This issue also appears on line 1450 of the same file.
| contents: write | |
| contents: read |
|
@copilot review all comments. |
…idance Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e8a26248-d0ca-4630-904d-b647f38e6718 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed all actionable review feedback in 224ad92.
No UI changes were made in this update. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot merge main and recompile |
…s-use-upload-asset # Conflicts: # .github/workflows/api-consumption-report.lock.yml # .github/workflows/audit-workflows.lock.yml # .github/workflows/copilot-pr-nlp-analysis.lock.yml # .github/workflows/copilot-token-audit.lock.yml # .github/workflows/daily-code-metrics.lock.yml # .github/workflows/daily-firewall-report.lock.yml # .github/workflows/daily-integrity-analysis.lock.yml # .github/workflows/daily-issues-report.lock.yml # .github/workflows/daily-performance-summary.lock.yml # .github/workflows/daily-repo-chronicle.lock.yml # .github/workflows/github-mcp-structural-analysis.lock.yml # .github/workflows/org-health-report.lock.yml # .github/workflows/portfolio-analyst.lock.yml # .github/workflows/prompt-clustering-analysis.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 28f9e70. Merged Note: full Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
upload-artifactfor image/chart/screenshot uploadsupload_assettool semantics and required input path formatupload-asset(and remove image-upload recommendations forupload-artifact)upload-assetfor image/chart uploadsupload_assetfor screenshots/charts/imagesmake agent-finish) after editsparallel_validationand review findings