mirror of
https://github.com/hotyue/IP-Sentinel.git
synced 2026-09-09 01:17:17 +08:00
ci: 剔除失效第三方插件,重构为高可用原生双引擎拉取架构
This commit is contained in:
@@ -12,16 +12,22 @@ jobs:
|
|||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Generate Star History SVG
|
- name: Fetch Star History SVG (Dual Engine)
|
||||||
uses: dyte-io/star-history-action@v1.0.3
|
run: |
|
||||||
with:
|
mkdir -p data
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
echo "🚀 [Action] 正在尝试从主引擎拉取星标趋势图..."
|
||||||
output: 'data/star_history.svg'
|
HTTP_CODE=$(curl -sL -w "%{http_code}" "https://api.star-history.com/svg?repos=${{ github.repository }}&type=Date" -o data/star_history.svg)
|
||||||
|
|
||||||
|
if [ "$HTTP_CODE" -ne 200 ]; then
|
||||||
|
echo "⚠️ [Warning] 主引擎响应异常 (HTTP $HTTP_CODE)!正在无缝切换至备用引擎..."
|
||||||
|
curl -sL "https://stars.medv.io/${{ github.repository }}.svg" -o data/star_history.svg
|
||||||
|
fi
|
||||||
|
echo "✅ [Success] 星标趋势图拉取完毕!"
|
||||||
|
|
||||||
- name: Commit & Push Changes
|
- name: Commit & Push Changes
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
git add data/star_history.svg
|
git add data/star_history.svg
|
||||||
git commit -m "chore: 自动化更新 Star 趋势图" || exit 0
|
git commit -m "chore: 自动化更新 Star 趋势图 (Native Curl 双擎版)" || exit 0
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|||||||
Reference in New Issue
Block a user