From 0f0dfd2a04304a978ee3cd4df9e462223f29888b Mon Sep 17 00:00:00 2001 From: Sydney Millerwise Date: Thu, 25 Jul 2024 13:24:17 -0700 Subject: [PATCH] Update lighthouse-badger.yml Copy Michaels --- .github/workflows/lighthouse-badger.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lighthouse-badger.yml b/.github/workflows/lighthouse-badger.yml index 37628ca0..6e890952 100644 --- a/.github/workflows/lighthouse-badger.yml +++ b/.github/workflows/lighthouse-badger.yml @@ -12,12 +12,12 @@ name: "Lighthouse Badger" # DEFINE YOUR INPUTS AND TRIGGERS IN THE FOLLOWING ######################################################################## -# INPUTS as Secrets (env) for not manually triggered workflows +# INPUTS as environmental variables (env) for not manually triggered workflows env: URLS: https://alshedivat.github.io/al-folio/ - TOKEN_NAME: ${{ secrets.LIGHTHOUSE_BADGER_TOKEN }} + TOKEN_NAME: GITHUB_TOKEN # If any of the following env is blank, a default value is used instead - REPO_BRANCH: "${{ github.repository }} master" # target repository & branch e.g. 'dummy/mytargetrepo main' + REPO_BRANCH: "${{ github.repository }} main" # target repository & branch e.g. 'dummy/mytargetrepo main' MOBILE_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --throttling.cpuSlowdownMultiplier=2" DESKTOP_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --preset=desktop --throttling.cpuSlowdownMultiplier=1" @@ -47,16 +47,20 @@ jobs: echo "BRANCH=$BRANCH" >> $GITHUB_ENV env: REPO_BRANCH: ${{ env.REPO_BRANCH }} - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 with: repository: ${{ env.REPOSITORY }} - token: ${{ secrets[github.event.inputs.token_name] || secrets[env.TOKEN_NAME] }} + token: ${{ secrets.GITHUB_TOKEN }} ref: ${{ env.BRANCH }} - - uses: actions/checkout@v4 + - name: Checkout lighthouse-badges + uses: actions/checkout@v4 with: repository: "myactionway/lighthouse-badges" + token: ${{ secrets.GITHUB_TOKEN }} path: temp_lighthouse_badges_nested - - uses: myactionway/lighthouse-badger-action@v2.2 + - name: Run Lighthouse Badger Action + uses: myactionway/lighthouse-badger-action@v2.2 with: urls: ${{ env.URLS }} mobile_lighthouse_params: ${{ env.MOBILE_LIGHTHOUSE_PARAMS }}