Skip to content

⏸️ feat: make record-screenshots workflow compatible with main app - #766

Draft
mmathieum with Copilot wants to merge 11 commits into
masterfrom
copilot/compatible-screenshots-workflow
Draft

⏸️ feat: make record-screenshots workflow compatible with main app#766
mmathieum with Copilot wants to merge 11 commits into
masterfrom
copilot/compatible-screenshots-workflow

Conversation

Copilot AI commented May 29, 2026

Copy link
Copy Markdown
Contributor

The mt-record-screenshots workflow was hardcoded for single-module agency repos and explicitly excluded the main app. This adds a modules input to support defining multiple agency modules to download and install, enabling screenshot generation from the main app repo.

Workflow (mt-record-screenshots.yml)

  • New modules input — JSON array of {pkg, repo} pairs; each entry's latest release APK is downloaded and installed before screenshots run
    gh workflow run mt-record-screenshots.yml \
      --ref $(git rev-parse --abbrev-ref HEAD) \
      -f modules='[{"pkg":"org.mtransit.android.ca_montreal_stm_bus","repo":"mtransitapps/ca-montreal-stm-bus-android"}]'
  • Removed main-repo exclusion from job if condition
  • "Download main app APK" step — skipped for main repo (the repo itself is the main app)
  • "Download/build this app APK" steps — output MAIN_APK_FILE when MT_IS_MAIN_REPO=true, MODULE_APK_FILE otherwise
  • New validation step — fails early if modules input is empty when running from the main repo
  • New "download module APKs" step — parses modules JSON with jq, downloads each APK via download_latest_apk.sh, and writes a pkg:apk_file manifest
  • Timezone step — gracefully falls back to UTC for main repo instead of hard exit 1 (no single-agency timezone XML)
  • Emulator step — passes MODULE_APK_FILES_MANIFEST env var to the setup script

Setup script (setup-and-all-app-screenshots.sh)

  • Accepts MODULE_APK_FILE (single module, agency repos) or MODULE_APK_FILES_MANIFEST (multi-module, main repo); errors if neither is set
  • Step 3 now installs from either the single APK or iterates the manifest, with consistent exit 1 on installation failure in both paths

Need:

Testing

- Add `modules` workflow input (JSON array of {pkg, repo} objects)
- Remove main-repo exclusion from job condition
- Skip "download main app APK" for main repo (main app IS this repo)
- "Download/build this app APK" steps output MAIN_APK_FILE for main repo
- Add validation step to fail early when main repo runs without modules
- Add "download module APKs" step that writes a pkg:apk_file manifest
- Timezone step falls back to UTC for main repo without error
- Pass MODULE_APK_FILES_MANIFEST to emulator step
- setup-and-all-app-screenshots.sh: accept manifest for multi-module install
Updated default value for modules to include a JSON array of module details.

@mmathieum mmathieum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  • should create different workflow? Need to be compat w/ multiple time zones...

Comment thread shared-overwrite/.github/workflows/mt-record-screenshots.yml Outdated
mmathieum added a commit to mtransitapps/ca-montreal-amt-train-android that referenced this pull request Aug 25, 2026
@mmathieum mmathieum added the paused ⏸️ paused work label Sep 3, 2026
@mmathieum

Copy link
Copy Markdown
Member

@mmathieum mmathieum changed the title feat: make record-screenshots workflow compatible with main app (org.mtransit.android) ⏸️ feat: make record-screenshots workflow compatible with main app Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

paused ⏸️ paused work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants