-
Notifications
You must be signed in to change notification settings - Fork 52
71 lines (57 loc) · 2.37 KB
/
transform-plugin-data.yml
File metadata and controls
71 lines (57 loc) · 2.37 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Transform Plugin Data
on:
schedule:
# 每小时执行一次 (UTC时间)
- cron: '0 * * * *'
workflow_dispatch: # 允许手动触发
permissions:
contents: write
actions: read
jobs:
transform-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0
- name: Configure Git
run: bash "scripts/transform_plugin_data/configure_git/run.sh"
- name: Fetch original plugin data
id: fetch-data
run: bash "scripts/transform_plugin_data/fetch_original_plugin_data/run.sh"
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
- name: Load existing cache for fallback
if: steps.fetch-data.outputs.should_update == 'true'
id: load-cache
run: bash "scripts/transform_plugin_data/load_existing_cache_for_fallback/run.sh"
- name: Get GitHub API info for repositories
if: steps.fetch-data.outputs.should_update == 'true'
id: get-repo-info
run: bash "scripts/transform_plugin_data/get_github_api_info_for_repositories/run.sh"
env:
PAT_TOKEN: ${{ secrets.PAT_TOKEN }}
HAS_EXISTING_CACHE: ${{ steps.load-cache.outputs.has_existing_cache }}
- name: Transform plugin data
if: steps.fetch-data.outputs.should_update == 'true'
run: bash "scripts/transform_plugin_data/transform_plugin_data/run.sh"
- name: Pull latest changes before checking (rebase with autostash)
run: bash "scripts/transform_plugin_data/pull_latest_changes_before_checking_rebase_with_autostash/run.sh"
- name: Check for changes
if: steps.fetch-data.outputs.should_update == 'true'
id: git-check
run: bash "scripts/transform_plugin_data/check_for_changes/run.sh"
- name: Commit and push changes
if: steps.fetch-data.outputs.should_update == 'true' && steps.git-check.outputs.has_changes == 'true'
run: bash "scripts/transform_plugin_data/commit_and_push_changes/run.sh"
- name: Clean up
if: always()
run: bash "scripts/transform_plugin_data/clean_up/run.sh"
- name: Summary
if: always()
run: bash "scripts/transform_plugin_data/summary/run.sh"
env:
SHOULD_UPDATE: ${{ steps.fetch-data.outputs.should_update }}
HAS_CHANGES: ${{ steps.git-check.outputs.has_changes }}