From b0a577d2b242e6e8592772c0b00686ec0ad0aba5 Mon Sep 17 00:00:00 2001 From: Sedat Qaja Date: Mon, 19 Oct 2026 16:34:45 +0200 Subject: [PATCH] ci: let the screenshot recorder pull LFS on the private fork The cached LFS checkout action checks out with persist-credentials: false and then runs `git lfs pull` on a cache miss. Upstream is public, so that pull works anonymously; on this private fork it fails with `could not read Username for 'https://github.com'`, which is why the Record-Screenshots label never produced a recording here (the only successful runs were manual dispatches with a warm LFS cache). Keep the job token configured for both LFS checkout steps. The push of the recorded goldens already authenticates with the same token. --- .github/workflows/recordScreenshots.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/recordScreenshots.yml b/.github/workflows/recordScreenshots.yml index 48a9f62cec..9bee6a857f 100644 --- a/.github/workflows/recordScreenshots.yml +++ b/.github/workflows/recordScreenshots.yml @@ -60,17 +60,21 @@ jobs: uses: actions-ecosystem/action-remove-labels@2ce5d41b4b6aa8503e285553f75ed56e0a40bae0 # v1.3.0 with: labels: Record-Screenshots + # Private fork: the action checks out and then runs `git lfs pull` on a cache miss. Upstream + # can do that anonymously because it is public; here the pull needs the job token, so the + # credentials must stay configured. Without this the step dies with + # `could not read Username for 'https://github.com'`. - name: ⏬ Checkout with LFS (PR) if: github.event.label.name == 'Record-Screenshots' - uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5 + uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5 zizmor: ignore[artipacked] with: - persist-credentials: false + persist-credentials: true ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} - name: ⏬ Checkout with LFS (Branch) if: github.event_name == 'workflow_dispatch' - uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5 + uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5 zizmor: ignore[artipacked] with: - persist-credentials: false + persist-credentials: true - name: ☕️ Use JDK 21 uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1 with: