From f96020bfe9bd7658da1bccbb94494e3252a681d4 Mon Sep 17 00:00:00 2001 From: yusufipk Date: Wed, 9 Sep 2026 15:08:23 +0300 Subject: [PATCH] Run platform UI screenshots only on demand --- .github/workflows/ui-screenshots.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ui-screenshots.yml b/.github/workflows/ui-screenshots.yml index 78a7db3..586d631 100644 --- a/.github/workflows/ui-screenshots.yml +++ b/.github/workflows/ui-screenshots.yml @@ -1,8 +1,13 @@ name: UI screenshots +run-name: "UI screenshots (${{ inputs.pr && format('PR #{0}', inputs.pr) || github.ref_name }})" on: - pull_request: workflow_dispatch: + inputs: + pr: + description: "PR number to capture (leave empty for the selected branch)" + required: false + type: string permissions: contents: read @@ -26,6 +31,9 @@ jobs: QT_SCALE_FACTOR: "2" steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.pr && format('refs/pull/{0}/head', inputs.pr) || github.ref }} + persist-credentials: false - uses: actions/setup-python@v5 with: python-version: "3.13" @@ -55,4 +63,4 @@ jobs: name: ui-screenshots-${{ runner.os }} path: ui-screenshots/ if-no-files-found: error - retention-days: 14 + retention-days: 90