forgejo/.forgejo/workflows/renovate.yml
Earl Warren ae5e0c0ff6
[CI] run renovate daily instead of every 30 minutes
It was necessary in the debug period to help with a faster debug
loop. Now that it works reliably, there is no need for renovate
updates more than once a day.

It will still possible to force a run, should it be necessary, by
re-running the last scheduled job.
2024-03-30 17:48:08 +01:00

61 lines
2 KiB
YAML

#
# The 2am run will rebase what needs rebasing & trigger the CI
# The 4am run will merge one of them
#
# These times are chosen to minimize the likelyhood that another PR
# is merged at the same time. This would not be necessary if automerge
# worked but as of 30 March 2024 it does not.
#
name: renovate
on:
push:
branches:
- 'renovate/**' # self-test updates
schedule:
- cron: '0 2,4 * * *'
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 != '' }}
runs-on: docker
container:
image: ghcr.io/visualon/renovate:37.272.0
steps:
- uses: https://code.forgejo.org/actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
.tmp/cache/renovate/repository
key: repo-cache-${{ github.run_id }}
restore-keys: |
repo-cache-
- 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>'
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'
- name: Save renovate repo cache
if: always() && env.RENOVATE_DRY_RUN == 'true'
uses: https://code.forgejo.org/actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
.tmp/cache/renovate/repository
key: repo-cache-${{ github.run_id }}