2024-03-30 18:05:24 +03:00
|
|
|
#
|
2024-04-08 10:16:51 +03:00
|
|
|
# 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.
|
2024-03-30 18:05:24 +03:00
|
|
|
#
|
2024-03-25 12:31:15 +03:00
|
|
|
name: renovate
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-11-08 15:05:43 +03:00
|
|
|
- renovate/** # self-test updates
|
|
|
|
paths:
|
|
|
|
- .forgejo/workflows/renovate.yml
|
2024-03-25 12:31:15 +03:00
|
|
|
schedule:
|
2024-04-08 10:16:51 +03:00
|
|
|
- cron: '0 0/2 * * *'
|
2024-08-06 12:34:36 +03:00
|
|
|
workflow_dispatch:
|
2024-03-25 12:31:15 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
RENOVATE_DRY_RUN: ${{ (github.event_name != 'schedule' && github.ref_name != github.event.repository.default_branch) && 'full' || '' }}
|
|
|
|
RENOVATE_REPOSITORIES: ${{ github.repository }}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
renovate:
|
|
|
|
if: ${{ secrets.RENOVATE_TOKEN != '' }}
|
|
|
|
|
2024-11-08 14:18:29 +03:00
|
|
|
runs-on: docker-runner-one
|
2024-03-25 12:31:15 +03:00
|
|
|
container:
|
2024-11-11 08:57:44 +03:00
|
|
|
image: code.forgejo.org/forgejo-contrib/renovate:39.9.1
|
2024-03-25 12:31:15 +03:00
|
|
|
|
|
|
|
steps:
|
2024-04-18 14:22:51 +03:00
|
|
|
- name: Load renovate repo cache
|
2024-10-09 07:54:02 +03:00
|
|
|
uses: https://code.forgejo.org/actions/cache/restore@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2024-03-25 12:31:15 +03:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.tmp/cache/renovate/repository
|
2024-05-31 13:36:19 +03:00
|
|
|
.tmp/cache/renovate/renovate-cache-sqlite
|
2024-03-25 16:41:46 +03:00
|
|
|
.tmp/osv
|
2024-03-25 12:31:15 +03:00
|
|
|
key: repo-cache-${{ github.run_id }}
|
|
|
|
restore-keys: |
|
|
|
|
repo-cache-
|
|
|
|
|
2024-04-18 21:08:27 +03:00
|
|
|
- name: Run renovate
|
|
|
|
run: renovate
|
2024-03-25 12:31:15 +03:00
|
|
|
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>'
|
|
|
|
|
2024-05-31 13:36:19 +03:00
|
|
|
RENOVATE_X_SQLITE_PACKAGE_CACHE: true
|
|
|
|
|
2024-03-25 12:31:15 +03:00
|
|
|
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'
|
|
|
|
|
2024-03-25 16:41:46 +03:00
|
|
|
OSV_OFFLINE_ROOT_DIR: ${{ github.workspace }}/.tmp/osv
|
|
|
|
|
2024-03-25 12:31:15 +03:00
|
|
|
- name: Save renovate repo cache
|
2024-04-08 09:47:02 +03:00
|
|
|
if: always() && env.RENOVATE_DRY_RUN != 'full'
|
2024-10-09 07:54:02 +03:00
|
|
|
uses: https://code.forgejo.org/actions/cache/save@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1
|
2024-03-25 12:31:15 +03:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
.tmp/cache/renovate/repository
|
2024-05-31 13:36:19 +03:00
|
|
|
.tmp/cache/renovate/renovate-cache-sqlite
|
2024-03-25 16:41:46 +03:00
|
|
|
.tmp/osv
|
2024-03-25 12:31:15 +03:00
|
|
|
key: repo-cache-${{ github.run_id }}
|