-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (55 loc) · 2.17 KB
/
Copy pathshowcase-checker.yml
File metadata and controls
57 lines (55 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Showcase Checker
# Controls when the workflow will run
on:
issues:
# 新增(打开)/关闭/重新打开/设置标签/移除标签
types: [opened, closed, reopened, labeled, unlabeled]
# 手动触发
workflow_dispatch:
# 每天凌晨4点运行一次
schedule:
- cron: '0 20 * * *'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
theme-checker:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repository
uses: actions/checkout@v4
# 检查示例博客主题状态
- name: Check Showcase
uses: xaoxuu/links-checker@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
checker: 'theme'
exclude_issue_with_labels: '审核中, 白名单' # 具有哪些标签的issue不进行检查
theme_checker_meta_tag: 'meta[theme-name="Stellar"]'
unreachable_label: '失联'
theme_checker_invalid_label: '无效主题'
# 检查完毕后重新生成一下JSON
- name: Generate data.json
uses: xaoxuu/issues2json@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sort: 'version-desc' # created-desc/created-asc/updated-desc/updated-asc/version-desc
exclude_issue_with_labels: '审核中, 风险网站, 无效主题' # 具有哪些标签的issue不生成到JSON中
hide_labels: '白名单' # 这些标签不显示在前端页面
- name: Setup Git Config
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit and Push to output branch
run: |
git fetch origin output || true
git checkout -B output
git add --all
git commit -m "Update data from issues" || echo "No changes to commit"
git push -f origin output