Files
admin-toolsuite/examples/renovate-trigger.yaml
T

39 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# .gitea/workflows/renovate-trigger.yaml
# Liegt in JEDEM Repo, das Renovate betreut.
# Wird ein Haken im Dependency Dashboard oder in einem Renovate-PR gesetzt,
# startet dieser Workflow sofort einen gezielten Renovate-Lauf nur für dieses Repo.
#
# Voraussetzung: Secret RENOVATE_DISPATCH_TOKEN (am besten einmal auf Org-Ebene)
# = Gitea-Token mit Schreibrecht auf infra/renovate-bot (Scope: write:repository)
name: renovate-trigger
on:
issues:
types: [edited]
pull_request:
types: [edited]
jobs:
dispatch:
# Renovate bearbeitet Dashboard und PRs bei jedem Lauf selbst –
# ohne den Actor-Filter entsteht eine Endlosschleife.
# 'renovate-bot' durch den Gitea-Benutzernamen des Bots ersetzen.
if: >-
github.actor != 'renovate-bot' &&
(
(github.event_name == 'issues' && github.event.issue.title == 'Dependency Dashboard') ||
(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/'))
)
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Renovate für dieses Repo anstoßen
run: |
curl -fsS -X POST \
-H "Authorization: token ${{ secrets.RENOVATE_DISPATCH_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"ref":"main","inputs":{"repo":"${{ github.repository }}"}}' \
"https://git.share-fix.de/api/v1/repos/infra/renovate-bot/actions/workflows/renovate.yaml/dispatches"