Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AshBuk
Copy link

@AshBuk AshBuk commented Nov 16, 2025

Fixes #3548

Problem

Imgur API returns "Too Many Requests" errors (code 1025), blocking successfully tested applications from being merged.

Solution

Replace Imgur with GitHub Release Assets:

  • Screenshots are uploaded to a draft release named 'ci-screenshots'
  • Inline images displayed in PR comments
  • Works for PRs from external contributors using workflow_run trigger

Workflow

  1. PR created → Test workflow runs
  2. worker.sh creates screenshot → database/{APP}/screenshot.png
  3. Test workflow uploads artifact (7 days retention) - modify as needed
  4. Test succeeds → Publish workflow activates
  5. Downloads artifact → Uploads to release ci-screenshots
  6. Posts comment on PR with inline images

Security

1. Separation of contexts:

  • Untrusted code (PR) → limited permissions → only artifacts
  • Trusted code (base repo) → write permissions → data processing

2. Does not execute code from PR in privileged context:

  • Only data (PNG) from PR

Reference: Keeping your GitHub Actions and workflows secure: Preventing pwn requests

Fixes AppImage#3548

## Problem
Imgur API returns "Too Many Requests" errors (code 1025), blocking
successfully tested applications from being merged.

## Solution
Replace Imgur with GitHub Release Assets:
- Screenshots are uploaded to a draft release named 'ci-screenshots'
- Inline images displayed in PR comments
- Works for PRs from external contributors using workflow_run trigger
@AshBuk
Copy link
Author

AshBuk commented Nov 16, 2025

@probonopd
Needs testing as the workflow only triggers on data/** changes.
P.S. If a release asset suddenly fails to render inline on GitHub (rare, but it happens), the easiest fallback is to commit it to a dedicated screenshots branch instead of using a release.

@AshBuk AshBuk mentioned this pull request Nov 16, 2025
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.

Replace imgur?

1 participant