mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-06 16:08:05 +00:00
The marketplace index can now carry plugins of other publishers, published from their authors' repositories through the l0ng-ai/openidea-plugins registry. - `openidea-plugin index` with a key replaces only that publisher's plugins (it used to drop every other entry); without a key it indexes each package against the publishers the index already lists, checking the key and the id prefix instead of only the signature itself. - `openidea-plugin merge` takes another index's publishers, plugins and revocations in place of every publisher but `--keep`; the other index can't list or revoke the kept publishers' plugins. - `openidea-plugin check` accepts a `.oiplugin` file. - Releases merge the registry's index into plugins-index.json and attach the Linux x64 tool; plugins-index.yml refreshes the community plugins in the latest release hourly or when the registry signals a change. - plugins/README.md and CONTRIBUTING.md describe official and community plugins.
47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
name: Plugin index
|
|
|
|
# Refreshes the community plugins in the latest release's plugins-index.json
|
|
# (what released apps read) from the registry, l0ng-ai/openidea-plugins. The
|
|
# official plugins, their key and revocations stay as the release wrote them.
|
|
on:
|
|
schedule:
|
|
- cron: "17 * * * *"
|
|
workflow_dispatch:
|
|
# Sent by the registry when its index changes.
|
|
repository_dispatch:
|
|
types: [community-plugins]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
concurrency:
|
|
group: plugins-index
|
|
|
|
env:
|
|
COMMUNITY_PLUGINS_INDEX: https://github.com/l0ng-ai/openidea-plugins/releases/download/index/index.json
|
|
|
|
jobs:
|
|
merge:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Merge the community index
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
set -euo pipefail
|
|
cd "$RUNNER_TEMP"
|
|
tag="$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName -q .tagName)"
|
|
tool=openidea-plugin-linux-x86_64
|
|
if ! gh release download "$tag" --repo "$GITHUB_REPOSITORY" -p plugins-index.json -p "$tool.gz"; then
|
|
echo "::notice::$tag has no plugin index or openidea-plugin tool yet"
|
|
exit 0
|
|
fi
|
|
gunzip "$tool.gz" && chmod +x "$tool"
|
|
cp plugins-index.json before.json
|
|
"./$tool" merge plugins-index.json "$COMMUNITY_PLUGINS_INDEX" --keep openidea
|
|
if cmp -s before.json plugins-index.json; then
|
|
echo "unchanged"
|
|
else
|
|
gh release upload "$tag" plugins-index.json --repo "$GITHUB_REPOSITORY" --clobber
|
|
fi
|