From 2a18eec93cc6deb5054a03b2f753ea92260ccc76 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 23 Jun 2025 11:16:47 +0200 Subject: [PATCH] Add renovate action --- .github/renovate.json | 16 +++++++++++++++ .github/workflows/build.yaml | 1 - .github/workflows/renovate.yaml | 35 +++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/renovate.json create mode 100644 .github/workflows/renovate.yaml diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..7358a88 --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,16 @@ +{ + "onboarding": false, + "requireConfig": "optional", + "customManagers": [ + { + "customType": "regex", + "managerFilePatterns": [ + "/(^|/)template$/" + ], + "matchStrings": [ + "version=(?.*) # renovate: datasource=(?.*) depName=(?.*)" + ], + "extractVersionTemplate": "^v?(?.*)$" + } + ] +} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5413463..2d381ce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,7 +8,6 @@ on: push: paths: - 'srcpkgs/**' - - '.github/**' # for easier debugging jobs: changedpkgs: diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml new file mode 100644 index 0000000..9cf2fd9 --- /dev/null +++ b/.github/workflows/renovate.yaml @@ -0,0 +1,35 @@ +name: renovate +on: + schedule: + - cron: '0 * * * *' + push: + paths: + - '.github/**' # TODO: remove after debugging + +env: + LOG_LEVEL: 'debug' + RENOVATE_AUTODISCOVER: true + RENOVATE_AUTODISCOVER_FILTER: '${{ github.repository }}' + RENOVATE_PLATFORM: github + # RENOVATE_PLATFORM_COMMIT: true + # RENOVATE_BOT_NAME: 'breq' + +jobs: + renovate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: renovate package versions + uses: renovatebot/github-action@v43.0.1 + with: + configurationFile: .github/renovate.json + token: ${{ secrets.RENOVATE_TOKEN }} + + + - name: Find updated package + run: | + #!/usr/bin/env bash + set -euxo pipefail + echo "pkgbuild=$(git diff --name-only origin/main origin/${GITHUB_HEAD_REF} "*template" | head -1 | xargs dirname)" >> $GITHUB_ENV