Skip to content

Commit c3c6eb8

Browse files
authored
Merge pull request #5 from litestar-org/ci/test-pr-2
chore: remove consolidate commands + remove release + add daily sync
2 parents 90e275e + ce7ed32 commit c3c6eb8

9 files changed

Lines changed: 47 additions & 477 deletions

File tree

.github/workflows/daily-sync.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Daily Plugin Data Sync
2+
3+
on:
4+
schedule:
5+
# Run every day at 2:00 AM UTC
6+
- cron: '0 2 * * *'
7+
workflow_dispatch: # Allow manual trigger
8+
9+
jobs:
10+
sync-data:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v5
18+
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v7
21+
22+
- name: Set up Python
23+
run: uv python install
24+
25+
- name: Sync plugin metadata
26+
run: uv run sync
27+
28+
- name: Get README files
29+
run: uv run get-readme
30+
31+
- name: Check for changes
32+
id: git-check
33+
run: |
34+
git diff --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT
35+
36+
- name: Commit and push changes
37+
if: steps.git-check.outputs.has_changes == 'true'
38+
run: |
39+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
40+
git config --local user.name "github-actions[bot]"
41+
git add .
42+
git commit -m "chore: daily sync of plugin metadata and READMEs [automated]"
43+
git push
44+
45+
- name: No changes detected
46+
if: steps.git-check.outputs.has_changes != 'true'
47+
run: echo "No changes to commit"

.github/workflows/pr-merge-pipeline.yml

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,6 @@ jobs:
3232
- name: Get README files
3333
run: uv run get-readme
3434

35-
- name: Consolidate plugins
36-
run: uv run consolidate-plugins
37-
38-
- name: Consolidate READMEs
39-
run: uv run consolidate-readmes
40-
4135
- name: Check for changes
4236
id: git-check
4337
run: |
@@ -55,64 +49,3 @@ jobs:
5549
- name: No changes detected
5650
if: steps.git-check.outputs.has_changes != 'true'
5751
run: echo "No changes to commit"
58-
59-
create-release:
60-
# Only run after update-data job completes successfully
61-
needs: update-data
62-
runs-on: ubuntu-latest
63-
permissions:
64-
contents: write
65-
66-
steps:
67-
- name: Checkout repository
68-
uses: actions/checkout@v5
69-
with:
70-
ref: main
71-
72-
- name: Generate release tag
73-
id: tag
74-
run: |
75-
# Generate CalVer format: YY.MM.DD
76-
CALVER=$(date +'%y.%m.%d')
77-
78-
# Check if a release with this CalVer already exists
79-
COUNTER=0
80-
TAG="$CALVER"
81-
82-
# Fetch existing tags
83-
git fetch --tags
84-
85-
# Find the highest counter for today's releases
86-
while git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; do
87-
COUNTER=$((COUNTER + 1))
88-
TAG="$CALVER.$COUNTER"
89-
done
90-
91-
echo "tag=$TAG" >> $GITHUB_OUTPUT
92-
echo "Generated tag: $TAG"
93-
94-
- name: Create zip archives
95-
run: |
96-
zip -r plugins.zip plugins/
97-
zip -r readmes.zip readmes/
98-
zip -r plugins-and-readmes.zip plugins/ readmes/ output/
99-
100-
- name: Create Release
101-
uses: softprops/action-gh-release@v2
102-
with:
103-
tag_name: ${{ steps.tag.outputs.tag }}
104-
name: Release ${{ steps.tag.outputs.tag }}
105-
body: |
106-
Automatic release created from PR merge
107-
108-
**PR**: #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}
109-
**Merged by**: @${{ github.event.pull_request.merged_by.login }}
110-
**Commit**: ${{ github.sha }}
111-
files: |
112-
plugins.zip
113-
readmes.zip
114-
plugins-and-readmes.zip
115-
output/plugins.yml
116-
output/readmes.json
117-
draft: false
118-
prerelease: false

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@ uv run sync
2626
uv run get-readme
2727
```
2828

29-
- **Consolidate Plugins**: Consolidate all individual plugin YAML files into a single `output/plugins.yml`
30-
31-
```sh
32-
uv run consolidate-plugins
33-
```
34-
35-
- **Consolidate READMEs**: Consolidate all individual README markdown files into a single `output/readmes.json`
36-
37-
```sh
38-
uv run consolidate-readmes
39-
```
40-
4129
### Contribution
4230

4331
- If you feel a plugin is missing, please create a new [issue](https://github.com/litestar-org/plugin-registry/issues/new)

output/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)