From 33c1dcc61a1da547d20703cce45f838121a07463 Mon Sep 17 00:00:00 2001 From: tehw0lf Date: Wed, 24 Jun 2026 21:09:45 +0200 Subject: [PATCH 1/6] fix(lighthouse): use resultspath output instead of manifest --- .github/workflows/lighthouse-scan.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lighthouse-scan.yml b/.github/workflows/lighthouse-scan.yml index 4df80ca..5da20ce 100644 --- a/.github/workflows/lighthouse-scan.yml +++ b/.github/workflows/lighthouse-scan.yml @@ -58,11 +58,14 @@ jobs: - name: format report summary if: always() && steps.audit.outcome != 'skipped' run: | - echo "### 🔦 Lighthouse Audit Results" >> $GITHUB_STEP_SUMMARY + echo "### Lighthouse Audit Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "| URL | Performance | Accessibility | Best Practices | SEO |" >> $GITHUB_STEP_SUMMARY - echo "|-----|-------------|---------------|----------------|-----|" >> $GITHUB_STEP_SUMMARY - echo '${{ steps.audit.outputs.manifest }}' | jq -r '.[] | "| \(.url) | \(.summary.performance * 100 | round)% | \(.summary.accessibility * 100 | round)% | \(.summary["best-practices"] * 100 | round)% | \(.summary.seo * 100 | round)% |"' >> $GITHUB_STEP_SUMMARY || true + RESULTS_PATH="${{ steps.audit.outputs.resultspath }}" + if [ -f "$RESULTS_PATH" ]; then + echo "| URL | Performance | Accessibility | Best Practices | SEO |" >> $GITHUB_STEP_SUMMARY + echo "|-----|-------------|---------------|----------------|-----|" >> $GITHUB_STEP_SUMMARY + jq -r '.[] | "| \(.url) | \(.summary.performance * 100 | round)% | \(.summary.accessibility * 100 | round)% | \(.summary["best-practices"] * 100 | round)% | \(.summary.seo * 100 | round)% |"' "$RESULTS_PATH" >> $GITHUB_STEP_SUMMARY || true + fi echo "" >> $GITHUB_STEP_SUMMARY echo "Full reports: ${{ steps.audit.outputs.links }}" >> $GITHUB_STEP_SUMMARY continue-on-error: true From f96fee6f7086ac2b45b1a5e8ca32d72df4064e07 Mon Sep 17 00:00:00 2001 From: tehw0lf Date: Wed, 24 Jun 2026 21:17:21 +0200 Subject: [PATCH 2/6] fix(lighthouse): pass outputs via env to avoid actionlint expression error --- .github/workflows/lighthouse-scan.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lighthouse-scan.yml b/.github/workflows/lighthouse-scan.yml index 5da20ce..4f33cb6 100644 --- a/.github/workflows/lighthouse-scan.yml +++ b/.github/workflows/lighthouse-scan.yml @@ -57,15 +57,17 @@ jobs: - name: format report summary if: always() && steps.audit.outcome != 'skipped' + env: + RESULTS_PATH: ${{ steps.audit.outputs.resultspath }} + REPORT_LINKS: ${{ steps.audit.outputs.links }} run: | echo "### Lighthouse Audit Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - RESULTS_PATH="${{ steps.audit.outputs.resultspath }}" if [ -f "$RESULTS_PATH" ]; then echo "| URL | Performance | Accessibility | Best Practices | SEO |" >> $GITHUB_STEP_SUMMARY echo "|-----|-------------|---------------|----------------|-----|" >> $GITHUB_STEP_SUMMARY jq -r '.[] | "| \(.url) | \(.summary.performance * 100 | round)% | \(.summary.accessibility * 100 | round)% | \(.summary["best-practices"] * 100 | round)% | \(.summary.seo * 100 | round)% |"' "$RESULTS_PATH" >> $GITHUB_STEP_SUMMARY || true fi echo "" >> $GITHUB_STEP_SUMMARY - echo "Full reports: ${{ steps.audit.outputs.links }}" >> $GITHUB_STEP_SUMMARY + echo "Full reports: $REPORT_LINKS" >> $GITHUB_STEP_SUMMARY continue-on-error: true From d4d47b38832728125efc8bc61d76650c377e3376 Mon Sep 17 00:00:00 2001 From: tehw0lf Date: Wed, 24 Jun 2026 22:07:24 +0200 Subject: [PATCH 3/6] fix(actionlint): ignore treosh/lighthouse-ci-action output type errors --- .github/actionlint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index fe086aa..641d2f3 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -12,3 +12,4 @@ paths: - 'shellcheck reported issue in this script: SC2035:.+' # Info about glob patterns - 'shellcheck reported issue in this script: SC2153:.+' # False positive for environment variables - 'shellcheck reported issue in this script: SC2155:.+' # Declare and assign separately + - 'property ".+" is not defined in object type \{assertionresults: string; links: string; resultspath: string\}' # treosh/lighthouse-ci-action@v12 outputs not in actionlint db From 0469cbf8c455378f28a947fb39452ba852b1c034 Mon Sep 17 00:00:00 2001 From: tehw0lf Date: Wed, 24 Jun 2026 22:11:55 +0200 Subject: [PATCH 4/6] fix(lint): checkout PR sha instead of main to lint PR branch content --- .github/workflows/lighthouse-scan.yml | 10 +++------- .github/workflows/lint.yml | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lighthouse-scan.yml b/.github/workflows/lighthouse-scan.yml index 4f33cb6..f6c4020 100644 --- a/.github/workflows/lighthouse-scan.yml +++ b/.github/workflows/lighthouse-scan.yml @@ -57,17 +57,13 @@ jobs: - name: format report summary if: always() && steps.audit.outcome != 'skipped' - env: - RESULTS_PATH: ${{ steps.audit.outputs.resultspath }} - REPORT_LINKS: ${{ steps.audit.outputs.links }} run: | echo "### Lighthouse Audit Results" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - if [ -f "$RESULTS_PATH" ]; then + MANIFEST=$(find .lighthouseci -name 'manifest.json' 2>/dev/null | head -1) + if [ -f "$MANIFEST" ]; then echo "| URL | Performance | Accessibility | Best Practices | SEO |" >> $GITHUB_STEP_SUMMARY echo "|-----|-------------|---------------|----------------|-----|" >> $GITHUB_STEP_SUMMARY - jq -r '.[] | "| \(.url) | \(.summary.performance * 100 | round)% | \(.summary.accessibility * 100 | round)% | \(.summary["best-practices"] * 100 | round)% | \(.summary.seo * 100 | round)% |"' "$RESULTS_PATH" >> $GITHUB_STEP_SUMMARY || true + jq -r '.[] | "| \(.url) | \(.summary.performance * 100 | round)% | \(.summary.accessibility * 100 | round)% | \(.summary["best-practices"] * 100 | round)% | \(.summary.seo * 100 | round)% |"' "$MANIFEST" >> $GITHUB_STEP_SUMMARY || true fi - echo "" >> $GITHUB_STEP_SUMMARY - echo "Full reports: $REPORT_LINKS" >> $GITHUB_STEP_SUMMARY continue-on-error: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 728b1c5..5599be2 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v7 with: repository: tehw0lf/workflows - ref: main + ref: ${{ github.sha }} path: workflows-repo - name: Generate workflow hash for cache key From 1caa70a2ac6058c1b242cdb8bedf09003afd1613 Mon Sep 17 00:00:00 2001 From: tehw0lf Date: Wed, 24 Jun 2026 22:24:28 +0200 Subject: [PATCH 5/6] revert(lint): restore ref: main checkout --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5599be2..728b1c5 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -37,7 +37,7 @@ jobs: uses: actions/checkout@v7 with: repository: tehw0lf/workflows - ref: ${{ github.sha }} + ref: main path: workflows-repo - name: Generate workflow hash for cache key From 5245f98db14f4120b5dbbad9123b9a8379a5e1e4 Mon Sep 17 00:00:00 2001 From: tehw0lf Date: Wed, 24 Jun 2026 22:30:29 +0200 Subject: [PATCH 6/6] fix(lint): use PR sha when linting within workflows repo, main for external repos --- .github/workflows/lint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 728b1c5..f14a65c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,16 +28,18 @@ jobs: if [ "$REPO" = "tehw0lf/workflows" ]; then echo "is_workflow_repo=true" >> $GITHUB_OUTPUT echo "::notice::Running in workflows repository - write mode enabled" + echo "workflows_ref=${{ github.sha }}" >> $GITHUB_OUTPUT else echo "is_workflow_repo=false" >> $GITHUB_OUTPUT echo "::notice::Running in external repository - read-only mode" + echo "workflows_ref=main" >> $GITHUB_OUTPUT fi - name: Checkout workflow repository uses: actions/checkout@v7 with: repository: tehw0lf/workflows - ref: main + ref: ${{ steps.context.outputs.workflows_ref }} path: workflows-repo - name: Generate workflow hash for cache key