Skip to content

Migrate chart image uploads to upload-artifact with skip-archive in shared workflows#26075

Merged
pelikhan merged 2 commits intomainfrom
copilot/migrate-image-uploads-to-upload-artifact
Apr 13, 2026
Merged

Migrate chart image uploads to upload-artifact with skip-archive in shared workflows#26075
pelikhan merged 2 commits intomainfrom
copilot/migrate-image-uploads-to-upload-artifact

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 13, 2026

Replace actions/upload-artifact@v7 archive-based chart upload steps with upload-artifact safe-output tool (skip-archive: true), enabling inline image rendering via direct artifact URLs instead of requiring ZIP download.

shared/trending-charts-simple.md

  • Added safe-outputs.upload-artifact block (max-uploads: 5, retention-days: 30, skip-archive: true, image glob filters)
  • Removed Upload charts step (actions/upload-artifact@v7)
  • Added body section documenting upload_artifactslot_N_artifact_url![](URL) workflow

shared/python-dataviz.md

  • Removed Upload charts step — safe-outputs.upload-artifact with skip-archive: true was already configured in frontmatter
  • Updated "Artifact Upload" docs to reflect safe-output tool approach

stale-repo-identifier.md

  • Added top-level upload-artifact safe-output config to resolve import conflict — this workflow imports both python-dataviz.md and trending-charts-simple.md, which now both define upload-artifact. Top-level definition overrides per merge rules.

All 187 workflows compile successfully. Lock files regenerated.

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:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -pack /home/REDACTED/work/gh-aw/gh-aw/cmd/gh-aw/main.go (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw ,short (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha pkg/workflow/data/action_pins.json; \ echo "��� Action pins synced successfully"; \ else \ echo "��� Warning: .github/aw/actions-lock.json does not exist yet"; \ fi (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v7 --jq .object.sha re re (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha get --global cal/bin/git http.https://gitgit (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha --get-regexp --global nfig/composer/vendor/bin/git (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha ithub/workflows show (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v7 --jq .object.sha k/gh-aw/gh-aw/.github/workflows config $name) { hasDiscussionsEnabled } } l (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha logs/command.sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha ithub/workflows --local /snap/bin/git gpg.program (http block)
    • Triggering command: /usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha k/gh-aw/gh-aw/.github/workflows (http block)

If you need me to access, download, or install something from one of these locations, you can either:

…hared workflows

- Add safe-outputs.upload-artifact block to trending-charts-simple.md
  (max-uploads: 5, retention-days: 30, skip-archive: true, image path filters)
- Remove old Upload charts step (actions/upload-artifact@v7) from both
  trending-charts-simple.md and python-dataviz.md
- Add Upload Charts (skip-archive) guide in trending-charts-simple.md body
- Update Artifact Upload section in python-dataviz.md to reflect safe-output tool
- Fix stale-repo-identifier.md safe-outputs conflict by adding top-level
  upload-artifact config (overrides both imported definitions)
- Recompile all affected workflow lock files

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/52dbb0d8-da91-481b-bd19-7a7e5b97ad08

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate image uploads to upload-artifact with skip-archive Migrate chart image uploads to upload-artifact with skip-archive in shared workflows Apr 13, 2026
Copilot AI requested a review from pelikhan April 13, 2026 18:11
@pelikhan pelikhan marked this pull request as ready for review April 13, 2026 18:42
Copilot AI review requested due to automatic review settings April 13, 2026 18:42
@pelikhan pelikhan merged commit e817bc9 into main Apr 13, 2026
52 of 54 checks passed
@pelikhan pelikhan deleted the copilot/migrate-image-uploads-to-upload-artifact branch April 13, 2026 18:42
@github-actions github-actions bot mentioned this pull request Apr 13, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates generated chart image uploads in shared agentic workflows from actions/upload-artifact (ZIP-based) to the upload_artifact safe-output tool configured with skip-archive: true, aiming to enable direct artifact URLs for inline image rendering.

Changes:

  • Added/standardized safe-outputs.upload-artifact configuration (with skip-archive: true) in shared workflow docs and select top-level workflow config to avoid import conflicts.
  • Removed several Upload charts steps that used actions/upload-artifact@v7 for PNG chart globs from generated lock workflows.
  • Regenerated workflow lock files to reflect updated safe-output tooling/staging behavior.
Show a summary per file
File Description
.github/workflows/weekly-issue-summary.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/stale-repo-identifier.md Adds top-level safe-outputs.upload-artifact config to override imported definitions and avoid conflicts.
.github/workflows/stale-repo-identifier.lock.yml Regenerated lock: removes chart upload step; updates safe-outputs config/staging wiring.
.github/workflows/shared/trending-charts-simple.md Adds safe-outputs.upload-artifact frontmatter and documents the new chart upload/embed flow.
.github/workflows/shared/python-dataviz.md Removes legacy “Upload charts” step and updates artifact-upload documentation to reference upload_artifact.
.github/workflows/python-data-charts.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/prompt-clustering-analysis.lock.yml Regenerated lock: removes chart upload step; adds upload-artifact safe-output config/staging wiring.
.github/workflows/portfolio-analyst.lock.yml Regenerated lock: removes chart upload step; adds upload-artifact safe-output config/staging wiring.
.github/workflows/org-health-report.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/github-mcp-structural-analysis.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/daily-repo-chronicle.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/daily-performance-summary.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/daily-news.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/daily-issues-report.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/daily-integrity-analysis.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/daily-firewall-report.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/daily-code-metrics.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/copilot-token-audit.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/copilot-session-insights.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).
.github/workflows/copilot-pr-nlp-analysis.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated for upload_artifact usage.
.github/workflows/audit-workflows.lock.yml Regenerated lock: removes chart upload step; safe-outputs config updated (includes upload_artifact config blocks).
.github/workflows/api-consumption-report.lock.yml Removes the dedicated “Upload charts” artifact step (expects chart handling via safe-outputs).

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 22/22 changed files
  • Comments generated: 4

Comment on lines +94 to +100
### Step 2: Upload as Artifact

Call the `upload_artifact` tool for each chart image:

```json
{ "type": "upload_artifact", "path": "/tmp/gh-aw/python/charts/trend.png" }
```
Comment on lines +316 to +323
Chart images are uploaded individually via the `upload_artifact` safe-output tool with `skip-archive: true`. Each image is stored as an individual file and the tool returns a direct artifact URL for inline rendering.

**Charts Artifact:**
- Name: `data-charts`
- Contents: PNG files from `/tmp/gh-aw/python/charts/`
**Chart Image Upload:**
- Tool: `upload_artifact` (safe-output)
- Config: `skip-archive: true`, up to 5 uploads per run
- Allowed: PNG, JPG, SVG files
- Retention: 30 days
- Returns: `slot_N_artifact_url` with direct link
Comment on lines 193 to 195
<safe-output-tools>
Tools: create_issue(max:10), upload_asset, missing_tool, missing_data, noop

cat << 'GH_AW_PROMPT_af0c15d7ea92bd9a_EOF'
cat << 'GH_AW_PROMPT_c643e73c5922d74e_EOF'
<safe-output-tools>
Tools: create_discussion, missing_tool, missing_data, noop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[q] migrate image uploads to upload-artifact with skip-archive in shared workflows

3 participants