Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

108 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ UPP – UNIVERSAL PROFILE PICTURE UPDATER FOR GITHUB

Automatically picks any image (SVG, PNG, JPG) from the Pictures/ folder of this repository, converts it to a small PNG (< 1β€―MB), and sets it as your personal avatar, organization avatars, or all at once.

Fully automated – with 2FA support, a headless browser, and caching for speed.

──────────────────────────────────────────────────────────── ✨ FEATURES

β€’ Mode‑based uploads – p (personal), o:<org> (org), a (all) β€’ Accepts .svg, .png, .jpg, .jpeg – with or without extension β€’ Always converts to PNG, resizing to 400Γ—400 (preserving aspect ratio) and compressing to < 1β€―MB; SVG files are rendered at high density (300β€―DPI) β€’ Handles two‑factor authentication (TOTP) automatically β€’ Multi‑target: update personal + multiple organisations in one run β€’ Emoji‑rich logs: βœ… ❌ πŸ” πŸ“‚ πŸ“Ž β€’ Debug screenshots saved only on failure (no noisy commits on success) β€’ Fast – Playwright binaries are cached, typical run < 30β€―seconds

──────────────────────────────────────────────────────────── πŸ”§ ONE‑TIME SETUP

  1. Enable Actions write access

    • Go to Settings β†’ Actions β†’ General
    • Under β€œWorkflow permissions”, select Read and write permissions
    • Save. This lets the workflow push debug screenshots to the repo.
  2. Add these secrets (Settings β†’ Secrets and variables β†’ Actions)

    Secret Description
    GH_LOGIN_USERNAME Your GitHub username
    GH_LOGIN_PASSWORD Your GitHub password
    GH_2FA_SECRET (if 2FA enabled) TOTP base32 setup key
    GH_ORGANIZATIONS (only for [a] mode) comma‑separated org usernames,
                     example: `myorg1,myorg2`
    

    πŸ“Œ How to get the TOTP secret Settings β†’ Password and authentication β†’ Authenticator app β†’ Edit β†’ Reconfigure β†’ Click β€œSetup key” below the QR code β†’ copy the string.

  3. Place your images Create a folder named Pictures (if it doesn’t exist) and put your SVG / PNG / JPG files inside. Case does not matter.

──────────────────────────────────────────────────────────── πŸš€ USAGE

  1. Go to the Actions tab β†’ UPP β†’ Run workflow.

  2. In the input field, type the file name and the target mode.

    Format: <filename>[<mode>]

    Modes

    Mode Meaning
    [p] Personal account (default if omitted)
    [o:orgname] Specific organisation
    [a] Personal + all organisations (needs GH_ORGANIZATIONS secret)

    Combine modes with a comma: logo[p],[o:design]

  3. Examples

    • GozoSag[p] β†’ personal avatar from GozoSag.svg
    • icon[o:dev-team] β†’ only org β€œdev-team” (any extension)
    • banner[a] β†’ personal + every org in GH_ORGANIZATIONS
    • photo.jpg[p],[o:hr] β†’ personal & β€œhr” org, using photo.jpg
  4. Click Run workflow.

    The action will:

    • Look for your file in Pictures/ (if you give an extension, it uses exactly that; otherwise it tries .svg β†’ .png β†’ .jpg β†’ .jpeg)
    • Convert / resize to a small PNG (always reprocessed to ensure the size limit)
    • Log into GitHub (2FA filled automatically if secret is set)
    • Upload the image to every requested profile
    • Save screenshots to Debug/ only on failure (then commit them)

──────────────────────────────────────────────────────────── πŸ“‹ LOGS (example)

πŸš€ Launching browser… πŸ” Entering 2FA code βœ… Logged in successfully 🎯 Uploading to p (https://github.com/settings/profile) πŸ“‚ Trying to open upload dialog… πŸ“Ž File attached βœ… p updated 🎯 Uploading to o:myorg (https://github.com/organizations/myorg/settings/profile) βœ… o:myorg updated βœ… All targets updated successfully

──────────────────────────────────────────────────────────── πŸ›  TROUBLESHOOTING

  • β€œFile not found” β†’ Check that the file is inside the Pictures/ folder. If you typed just photo, it searches for photo.svg, then photo.png, then photo.jpg, then photo.jpeg. Use the exact extension to be precise.

  • β€œ2FA wrong” β†’ Make sure GH_2FA_SECRET is the base32 setup key (not a 6‑digit code, not the QR image). Time is synced automatically.

  • Push / identity errors β†’ Confirm that Actions permissions are set to β€œRead and write” (Step 1) – this workflow needs to commit debug files.

  • For [a] mode β†’ the secret GH_ORGANIZATIONS must contain the exact organisation usernames, separated by commas (no spaces). Example: myorg,another-org

  • Slow install β†’ The first run installs Playwright and Chromium. Subsequent runs use a cache and will complete in under 30 seconds.

──────────────────────────────────────────────────────────── πŸ™ CREDITS

Build by Plangto and DeepSeek Powered by Playwright, Puppeteer Stealth, and GitHub Actions. TOTP generation uses only Node.js crypto - no external libraries.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors