summaryrefslogtreecommitdiffstats
path: root/.forgejo/workflows/renovate.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /.forgejo/workflows/renovate.yml
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to '.forgejo/workflows/renovate.yml')
-rw-r--r--.forgejo/workflows/renovate.yml71
1 files changed, 71 insertions, 0 deletions
diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml
new file mode 100644
index 0000000..dc69e17
--- /dev/null
+++ b/.forgejo/workflows/renovate.yml
@@ -0,0 +1,71 @@
+#
+# Runs every 2 hours, but Renovate is limited to create new PR before 4am.
+# See renovate.json for more settings.
+# Automerge is enabled for Renovate PR's but need to be approved before.
+#
+name: renovate
+
+on:
+ push:
+ branches:
+ - renovate/** # self-test updates
+ paths:
+ - .forgejo/workflows/renovate.yml
+ schedule:
+ - cron: '0 0/2 * * *'
+ workflow_dispatch:
+
+env:
+ RENOVATE_DRY_RUN: ${{ (github.event_name != 'schedule' && github.ref_name != github.event.repository.default_branch) && 'full' || '' }}
+ RENOVATE_REPOSITORIES: ${{ github.repository }}
+
+jobs:
+ renovate:
+ if: vars.ROLE == 'forgejo-coding' && secrets.RENOVATE_TOKEN != ''
+
+ runs-on: docker
+ container:
+ image: code.forgejo.org/forgejo-contrib/renovate:38.93.2
+
+ steps:
+ - name: Load renovate repo cache
+ uses: https://code.forgejo.org/actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ with:
+ path: |
+ .tmp/cache/renovate/repository
+ .tmp/cache/renovate/renovate-cache-sqlite
+ .tmp/osv
+ key: repo-cache-${{ github.run_id }}
+ restore-keys: |
+ repo-cache-
+
+ - name: Run renovate
+ run: renovate
+ env:
+ GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_COM_TOKEN }}
+ LOG_LEVEL: debug
+ RENOVATE_BASE_DIR: ${{ github.workspace }}/.tmp
+ RENOVATE_ENDPOINT: ${{ github.server_url }}
+ RENOVATE_PLATFORM: gitea
+ RENOVATE_REPOSITORY_CACHE: 'enabled'
+ RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
+ RENOVATE_GIT_AUTHOR: 'Renovate Bot <forgejo-renovate-action@forgejo.org>'
+
+ RENOVATE_X_SQLITE_PACKAGE_CACHE: true
+
+ GIT_AUTHOR_NAME: 'Renovate Bot'
+ GIT_AUTHOR_EMAIL: 'forgejo-renovate-action@forgejo.org'
+ GIT_COMMITTER_NAME: 'Renovate Bot'
+ GIT_COMMITTER_EMAIL: 'forgejo-renovate-action@forgejo.org'
+
+ OSV_OFFLINE_ROOT_DIR: ${{ github.workspace }}/.tmp/osv
+
+ - name: Save renovate repo cache
+ if: always() && env.RENOVATE_DRY_RUN != 'full'
+ uses: https://code.forgejo.org/actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ with:
+ path: |
+ .tmp/cache/renovate/repository
+ .tmp/cache/renovate/renovate-cache-sqlite
+ .tmp/osv
+ key: repo-cache-${{ github.run_id }}