generated from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0d5cbc
commit a1d8cd5
Showing
1 changed file
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
# Lighthouse-Badger-Easy | GitHub Action Workflow | ||
# | ||
# Description: Generates, adds & updates manually/automatically Lighthouse badges & reports from one/multiple input URL(s) to the current repository & main branch with minimal settings | ||
# Author: Sitdisch | ||
# Source: https://github.com/myactionway/lighthouse-badger-workflows | ||
# License: MIT | ||
# Copyright (c) 2021 Sitdisch | ||
|
||
name: "Lighthouse Badger" | ||
|
||
######################################################################## | ||
|
@@ -23,10 +15,8 @@ env: | |
# TRIGGERS | ||
on: | ||
page_build: | ||
# schedule: # Check your schedule here => https://crontab.guru/ | ||
# - cron: '55 23 * * 0' # e.g. every Sunday at 23:55 | ||
# | ||
# THAT'S IT; YOU'RE DONE; | ||
schedule: # Check your schedule here => https://crontab.guru/ | ||
- cron: '55 23 * * 0' # e.g. every Sunday at 23:55 | ||
workflow_dispatch: | ||
|
||
######################################################################## | ||
|
@@ -36,26 +26,36 @@ on: | |
jobs: | ||
lighthouse-badger-easy: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 8 | ||
timeout-minutes: 15 # 增加超时时间,避免复杂任务超时 | ||
steps: | ||
# Step 1: 解析 REPOSITORY 和 BRANCH | ||
- name: Preparatory Tasks | ||
run: | | ||
REPOSITORY=`expr "${{ env.REPO_BRANCH }}" : "\([^ ]*\)"` | ||
BRANCH=`expr "${{ env.REPO_BRANCH }}" : ".* \([^ ]*\)"` | ||
REPOSITORY=$(echo "${{ env.REPO_BRANCH }}" | awk '{print $1}') | ||
BRANCH=$(echo "${{ env.REPO_BRANCH }}" | awk '{print $2}') | ||
echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV | ||
echo "BRANCH=$BRANCH" >> $GITHUB_ENV | ||
env: | ||
REPO_BRANCH: ${{ env.REPO_BRANCH }} | ||
- uses: actions/checkout@v4 | ||
|
||
# Step 2: 检出目标仓库代码 | ||
- name: Checkout Target Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.REPOSITORY }} | ||
token: ${{ secrets.LIGHTHOUSE_BADGER_TOKEN }} | ||
ref: ${{ env.BRANCH }} | ||
- uses: actions/checkout@v4 | ||
|
||
# Step 3: 检出 Lighthouse Badges 仓库 | ||
- name: Checkout Lighthouse Badges Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "myactionway/lighthouse-badges" | ||
path: temp_lighthouse_badges_nested | ||
- uses: myactionway/[email protected] | ||
|
||
# Step 4: 运行 Lighthouse-Badger Action | ||
- name: Run Lighthouse-Badger | ||
uses: myactionway/[email protected] | ||
with: | ||
urls: ${{ env.URLS }} | ||
mobile_lighthouse_params: ${{ env.MOBILE_LIGHTHOUSE_PARAMS }} | ||
|