Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/daily-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Daily Plugin Data Sync

on:
schedule:
# Run every day at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch: # Allow manual trigger

jobs:
sync-data:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Set up Python
run: uv python install

- name: Sync plugin metadata
run: uv run sync

- name: Get README files
run: uv run get-readme

- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "has_changes=true" >> $GITHUB_OUTPUT

- name: Commit and push changes
if: steps.git-check.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "chore: daily sync of plugin metadata and READMEs [automated]"
git push

- name: No changes detected
if: steps.git-check.outputs.has_changes != 'true'
run: echo "No changes to commit"
67 changes: 0 additions & 67 deletions .github/workflows/pr-merge-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ jobs:
- name: Get README files
run: uv run get-readme

- name: Consolidate plugins
run: uv run consolidate-plugins

- name: Consolidate READMEs
run: uv run consolidate-readmes

- name: Check for changes
id: git-check
run: |
Expand All @@ -55,64 +49,3 @@ jobs:
- name: No changes detected
if: steps.git-check.outputs.has_changes != 'true'
run: echo "No changes to commit"

create-release:
# Only run after update-data job completes successfully
needs: update-data
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
ref: main

- name: Generate release tag
id: tag
run: |
# Generate CalVer format: YY.MM.DD
CALVER=$(date +'%y.%m.%d')

# Check if a release with this CalVer already exists
COUNTER=0
TAG="$CALVER"

# Fetch existing tags
git fetch --tags

# Find the highest counter for today's releases
while git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; do
COUNTER=$((COUNTER + 1))
TAG="$CALVER.$COUNTER"
done

echo "tag=$TAG" >> $GITHUB_OUTPUT
echo "Generated tag: $TAG"

- name: Create zip archives
run: |
zip -r plugins.zip plugins/
zip -r readmes.zip readmes/
zip -r plugins-and-readmes.zip plugins/ readmes/ output/

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: Release ${{ steps.tag.outputs.tag }}
body: |
Automatic release created from PR merge

**PR**: #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}
**Merged by**: @${{ github.event.pull_request.merged_by.login }}
**Commit**: ${{ github.sha }}
files: |
plugins.zip
readmes.zip
plugins-and-readmes.zip
output/plugins.yml
output/readmes.json
draft: false
prerelease: false
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@ uv run sync
uv run get-readme
```

- **Consolidate Plugins**: Consolidate all individual plugin YAML files into a single `output/plugins.yml`

```sh
uv run consolidate-plugins
```

- **Consolidate READMEs**: Consolidate all individual README markdown files into a single `output/readmes.json`

```sh
uv run consolidate-readmes
```

### Contribution

- If you feel a plugin is missing, please create a new [issue](https://github.com/litestar-org/plugin-registry/issues/new)
Expand Down
Empty file removed output/.gitkeep
Empty file.
Loading