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 # Während Testphase auf feature/release arbeiten token: ${{ secrets.GITEA_TOKEN }} - name: Install dependencies run: apk add --no-cache python3 py3-lxml py3-requests - name: Update plugins.xml env: GITEA_URL: ${{ vars.GITEA_URL }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} PLUGIN_NAME: ${{ github.event.client_payload.plugin }} VERSION: ${{ github.event.client_payload.version }} CHANNEL: ${{ github.event.client_payload.channel }} DOWNLOAD_URL: ${{ github.event.client_payload.download_url }} run: | python3 scripts/update_plugins_xml.py \ --plugin "$PLUGIN_NAME" \ --version "$VERSION" \ --channel "$CHANNEL" \ --download-url "$DOWNLOAD_URL" - 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 "chore: [${{ github.event.client_payload.channel }}] \ ${{ github.event.client_payload.plugin }} \ ${{ github.event.client_payload.version }}" || echo "No changes to commit" git push origin feature/release