File tree Expand file tree Collapse file tree 2 files changed +57
-5
lines changed
Expand file tree Collapse file tree 2 files changed +57
-5
lines changed Original file line number Diff line number Diff line change 11name : Create Release on PR Merge
22
33on :
4- pull_request :
4+ workflow_run :
5+ workflows : ["Update Plugin Data"]
56 types :
6- - closed
7+ - completed
78 branches :
89 - main
910
1011jobs :
1112 create-release :
12- # Only run if the PR was merged (not just closed)
13- if : github.event.pull_request.merged == true
13+ # Only run if the update workflow succeeded
14+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
1415 runs-on : ubuntu-latest
1516 permissions :
1617 contents : write
6566 readmes.zip
6667 plugins-and-readmes.zip
6768 draft : false
68- prerelease : false
69+ prerelease : false
Original file line number Diff line number Diff line change 1+ name : Update Plugin Data
2+
3+ on :
4+ pull_request :
5+ types :
6+ - closed
7+ branches :
8+ - main
9+ workflow_dispatch : # Allow manual trigger
10+
11+ jobs :
12+ update-data :
13+ # Only run if the PR was merged (not just closed)
14+ if : github.event.pull_request.merged == true
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : write
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v5
22+
23+ - name : Install uv
24+ uses : astral-sh/setup-uv@v7
25+
26+ - name : Set up Python
27+ run : uv python install
28+
29+ - name : Sync plugin metadata
30+ run : uv run sync
31+
32+ - name : Get README files
33+ run : uv run get-readme
34+
35+ - name : Check for changes
36+ id : git-check
37+ run : |
38+ git diff --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT
39+
40+ - name : Commit and push changes
41+ if : steps.git-check.outputs.has_changes == 'true'
42+ run : |
43+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
44+ git config --local user.name "github-actions[bot]"
45+ git add .
46+ git commit -m "chore: update plugin metadata and READMEs [automated]"
47+ git push
48+
49+ - name : No changes detected
50+ if : steps.git-check.outputs.has_changes != 'true'
51+ run : echo "No changes to commit"
You can’t perform that action at this time.
0 commit comments