Skip to content

Commit

Permalink
set lighthouse report to main branch with current time
Browse files Browse the repository at this point in the history
  • Loading branch information
ZibanPirate committed Sep 17, 2024
1 parent 839a610 commit e731d63
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.reusable.lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ jobs:
env:
LH_SERVER_BASE_URL: ${{ inputs.serverBaseUrl }}
LH_SERVER_TOKEN: ${{ inputs.stage == 'staging' && secrets.LH_SERVER_TOKEN_STG || secrets.LH_SERVER_TOKEN_PRD }}
# LHCI_BUILD_CONTEXT__COMMIT_TIME is set in "Get current time" step
LHCI_BUILD_CONTEXT__AVATAR_URL: "https://avatars.githubusercontent.com/u/63493121?s=200&v=4"
LHCI_BUILD_CONTEXT__AUTHOR: "dzcode-io"
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: "main"
LHCI_BUILD_CONTEXT__COMMIT_MESSAGE: "Automated Lighthouse CI"
LHCI_BUILD_CONTEXT__CURRENT_HASH: "run-${{ github.run_id }}-${{ github.run_number }}"
steps:
- name: "Git"
uses: actions/checkout@v4
Expand All @@ -100,4 +106,6 @@ jobs:
pattern: lighthouse*
merge-multiple: true
path: ./web/.lighthouseci
- name: "Get current time"
run: echo "LHCI_BUILD_CONTEXT__COMMIT_TIME=$(date '+%Y-%m-%d %H:%M:%S %z')" >> $GITHUB_ENV
- run: npx lerna run lh:upload --scope "@dzcode.io/web"

0 comments on commit e731d63

Please sign in to comment.