Remove outdated setup instructions for automatic updates in Plugin B
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
# Anleitung: Automatische Updates für "Plugin B" im Media-Bar Manifest
|
||||
|
||||
Damit dein Plugin B (das andere Repo) automatisch seine Version im `manifest.json` des **Media-Bar-Plugin** Repos aktualisiert, musst du die `release_automation.yml` **in Repo B** anpassen.
|
||||
|
||||
Das Prinzip ist dasselbe wie beim zentralen Repo: Repo B checkt Repo A aus und updatet sich selbst.
|
||||
|
||||
## Schritt 1: Secret anlegen
|
||||
Du brauchst ein **PAT (Personal Access Token)**, das Zugriff auf das **Media-Bar-Plugin** Repo hat.
|
||||
- Erstelle das Secret `MEDIA_BAR_REPO_PAT` im **Plugin B** Repo.
|
||||
|
||||
## Schritt 2: Workflow in Plugin B anpassen
|
||||
|
||||
Füge diesen Job-Step am Ende der `release_automation.yml` von **Plugin B** hinzu:
|
||||
|
||||
```yaml
|
||||
# ------------------------------------------------------------------
|
||||
# UPDATE MEDIA BAR MANIFEST (Cross-Promotion)
|
||||
# ------------------------------------------------------------------
|
||||
- name: Checkout Media Bar Repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: CodeDevMLH/Media-Bar-Plugin # <--- Ziel-Repo
|
||||
path: media-bar-repo
|
||||
token: ${{ secrets.MEDIA_BAR_REPO_PAT }}
|
||||
|
||||
- name: Update Entry in Media Bar Manifest
|
||||
shell: bash
|
||||
run: |
|
||||
cd media-bar-repo
|
||||
|
||||
# Info vom aktuellen Release (Repo B)
|
||||
VERSION="${{ env.VERSION }}"
|
||||
HASH="${{ env.ZIP_HASH }}"
|
||||
TIME="${{ env.BUILD_TIME }}"
|
||||
# URL zum Release von Repo B
|
||||
DOWNLOAD_URL="https://github.com/${{ github.repository }}/releases/download/v$VERSION/Jellyfin.Plugin.MeinTollesPlugin.zip" # <--- ANPASSEN
|
||||
|
||||
# GUID von Plugin B (Muss fest hinterlegt sein oder aus dem lokalen manifest kommen)
|
||||
PLUGIN_GUID="a1b2c3d4-..." # <--- GUID von Plugin B HIER EINTRAGEN
|
||||
|
||||
echo "Updating Media Bar Manifest for GUID: $PLUGIN_GUID"
|
||||
|
||||
# Update Logic (findet Eintrag anhand GUID und updatet ihn)
|
||||
jq --arg guid "$PLUGIN_GUID" \
|
||||
--arg hash "$HASH" \
|
||||
--arg time "$TIME" \
|
||||
--arg url "$DOWNLOAD_URL" \
|
||||
--arg ver "$VERSION" \
|
||||
'map(if .guid == $guid then
|
||||
.versions[0].version = $ver |
|
||||
.versions[0].checksum = $hash |
|
||||
.versions[0].timestamp = $time |
|
||||
.versions[0].sourceUrl = $url
|
||||
else . end)' \
|
||||
manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
|
||||
|
||||
- name: Commit and Push to Media Bar Repo
|
||||
run: |
|
||||
cd media-bar-repo
|
||||
git config user.name "GitHub Action"
|
||||
git config user.email "action@github.com"
|
||||
|
||||
if [[ -n $(git status -s) ]]; then
|
||||
git add manifest.json
|
||||
git commit -m "Auto-Update Plugin B to v${{ env.VERSION }}"
|
||||
git push
|
||||
else
|
||||
echo "No changes needed."
|
||||
fi
|
||||
```
|
||||
Reference in New Issue
Block a user