From 8d4d1239a6b0899e36a6232e2d452455bd35a6e8 Mon Sep 17 00:00:00 2001 From: Michael Otto Date: Tue, 3 Mar 2026 09:35:45 +0100 Subject: [PATCH] =?UTF-8?q?Workflow=20Update=20ge=C3=A4bdert,=20erster=20T?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/update-plugins-xml.yml | 48 ------------------------- .gitea/workflows/update.yml | 26 ++++++++++++++ 2 files changed, 26 insertions(+), 48 deletions(-) delete mode 100644 .gitea/workflows/update-plugins-xml.yml create mode 100644 .gitea/workflows/update.yml diff --git a/.gitea/workflows/update-plugins-xml.yml b/.gitea/workflows/update-plugins-xml.yml deleted file mode 100644 index 91c825a..0000000 --- a/.gitea/workflows/update-plugins-xml.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Update plugins.xml - -on: - repository_dispatch: - types: [plugin-released] - -jobs: - update: - runs-on: alpine-latest - steps: - - uses: actions/checkout@v3 - with: - ref: feature/release - token: ${{ secrets.GITEA_TOKEN }} - - - name: Select target XML file - id: target - run: | - case "${{ github.event.client_payload.channel }}" in - stable) echo "file=plugins.xml" >> $GITHUB_OUTPUT ;; - beta) echo "file=plugins-beta.xml" >> $GITHUB_OUTPUT ;; - dev) echo "file=plugins-dev.xml" >> $GITHUB_OUTPUT ;; - esac - - - name: Remove existing entry for this plugin - run: | - PLUGIN="${{ github.event.client_payload.plugin }}" - FILE="${{ steps.target.outputs.file }}" - sed -i "//d" "$FILE" - - - name: Insert new XML block - run: | - FILE="${{ steps.target.outputs.file }}" - BLOCK=$(printf '${{ github.event.client_payload.xml_block }}' | sed 's/\\n/\n/g') - sed -i "s||${BLOCK}\n|" "$FILE" - - - name: Commit and push - env: - GITEA_URL: ${{ vars.GITEA_URL }} - run: | - git config user.name "Gitea Actions" - git config user.email "actions@gitea.local" - git remote set-url origin \ - https://oauth2:${{ secrets.GITEA_TOKEN }}@${GITEA_URL#https://}/${{ github.repository }}.git - git add plugins.xml plugins-beta.xml plugins-dev.xml - git commit -m "[${{ github.event.client_payload.channel }}] ${{ github.event.client_payload.plugin }}" \ - || echo "Keine Änderungen" - git push origin feature/release \ No newline at end of file diff --git a/.gitea/workflows/update.yml b/.gitea/workflows/update.yml new file mode 100644 index 0000000..4832164 --- /dev/null +++ b/.gitea/workflows/update.yml @@ -0,0 +1,26 @@ +name: Test Payload Empfang (Alpine) + +on: + repository_dispatch: + types: [update_plugin] + +jobs: + show-payload: + runs-on: alpine-latest + + steps: + - name: Payload anzeigen + run: | + echo "Payload empfangen:" + echo "--------------------------------" + echo "Plugin: ${{ github.event.client_payload.plugin }}" + echo "Version: ${{ github.event.client_payload.version }}" + echo "Channel: ${{ github.event.client_payload.channel }}" + echo "Description: ${{ github.event.client_payload.description }}" + echo "Author: ${{ github.event.client_payload.author }}" + echo "Email: ${{ github.event.client_payload.email }}" + echo "URL: ${{ github.event.client_payload.url }}" + echo "Changelog:" + echo "--------------------------------" + echo "${{ github.event.client_payload.changelog }}" + echo "--------------------------------"