Skip to content

mt-release.yml: trigger record-screenshot workflow when screenshots are stale (>3 months)#609

Open
Copilot wants to merge 5 commits intomasterfrom
copilot/fix-trigger-record-screenshot-workflow
Open

mt-release.yml: trigger record-screenshot workflow when screenshots are stale (>3 months)#609
Copilot wants to merge 5 commits intomasterfrom
copilot/fix-trigger-record-screenshot-workflow

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

After a release completes, mt-record-screenshots.yml should auto-trigger when the phone screenshots haven't been updated in over 3 months.

Changes

  • mt-release.yml — two new steps appended after MT Publish release:
    • MT check screenshot age: inspects git log timestamp on app-android/src/main/play/listings/en-US/graphics/phone-screenshots; sets TRIGGER_SCREENSHOTS=true if the directory is missing, has no commits, or the latest commit is >90 days old
    • MT trigger record screenshots workflow: conditionally dispatches mt-record-screenshots.yml on the current branch via gh workflow run
- name: MT check screenshot age
  id: mt-check-screenshot-age
  run: |
    SCREENSHOT_DIR="app-android/src/main/play/listings/en-US/graphics/phone-screenshots"
    THREE_MONTHS_DAYS=90
    THREE_MONTHS_SECONDS=$(( THREE_MONTHS_DAYS * 24 * 60 * 60 ))
    if [[ ! -d "$SCREENSHOT_DIR" ]]; then
      echo "TRIGGER_SCREENSHOTS=true" >> $GITHUB_OUTPUT
    else
      LAST_COMMIT_TIMESTAMP=$(git log -1 --format="%ct" -- "$SCREENSHOT_DIR" 2>/dev/null)
      # ... age comparison, sets TRIGGER_SCREENSHOTS accordingly
    fi

- name: MT trigger record screenshots workflow
  if: ${{ steps.mt-check-screenshot-age.outputs.TRIGGER_SCREENSHOTS == 'true' }}
  run: gh workflow run mt-record-screenshots.yml --ref "${{ env.MT_BRANCH_NAME }}"
  env:
    GH_TOKEN: ${{ secrets.MT_PAT }}

The existing fetch-depth: 0 checkout ensures full git history is available for the age check.

Original prompt

This section details on the original issue you should resolve

<issue_title>mt-release.yml > Trigger record screenshot workflow sometimes</issue_title>
<issue_description>shared-overwrite/.github/workflows/mt-release.yml should trigger mt-record-screenshot.yml in the end when :

  • latest git change in app-android/src/main/play/listings/en-US/graphics/phone-screenshots is older than 3 months

</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…lder than 3 months

Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mt-release.yml to trigger record screenshot workflow mt-release.yml: trigger record-screenshot workflow when screenshots are stale (>3 months) Mar 18, 2026
Copilot AI requested a review from mmathieum March 18, 2026 02:54
Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Copilot AI requested a review from mmathieum March 18, 2026 12:18
…hots when stale

Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Copilot AI requested a review from mmathieum March 18, 2026 12:25
@mmathieum mmathieum marked this pull request as ready for review March 18, 2026 12:25
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.

mt-release.yml > Trigger record screenshot workflow sometimes

2 participants