Skip to content

Commit

Permalink
perf: schedule weekly and automerge monthly (#42)
Browse files Browse the repository at this point in the history
- Schedule renovate weekly from 0 to 3 o'clock on mondy.
- Schedule renovate automerge from 0 to 3 o'clock on the first day of each month.

See https://docs.renovatebot.com/presets-schedule/
--------
Signed-off-by: l.feng <[email protected]>
  • Loading branch information
msclock authored Dec 5, 2024
1 parent 7cb3acf commit 34116d5
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,5 +202,5 @@ jobs:
jobs: ${{ toJSON(needs) }}

- name: Approve pr if all jobs succeeded
if: contains(github.event.pull_request.labels.*.name, 'auto-approval')
if: contains(github.event.pull_request.labels.*.name, 'auto-approval') && contains(github.actor, '[bot]')
uses: hmarr/auto-approve-action@v4
4 changes: 2 additions & 2 deletions .github/workflows/renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Renovate

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/15 0-3 * * 1'
# Match renovate schedule:earlyMondays and schedule:automergeMonthly
- cron: '* 0-3 * * *'
workflow_dispatch:

jobs:
Expand Down
12 changes: 9 additions & 3 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@
"platformAutomerge": true,
"packageRules": [
{
"automerge": true,
"addLabels": [
"auto-approval"
],
"extends": [
"schedule:earlyMondays",
"schedule:automergeMonthly"
],
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"automerge": true
]
},
{
"matchDepTypes": [
Expand Down Expand Up @@ -76,7 +83,6 @@
"description": "Group renovate docker tag and pre-commit-hooks tag",
"groupName": "renovate group",
"addLabels": [
"auto-approval",
"renovate"
],
"matchDatasources": [
Expand Down
14 changes: 9 additions & 5 deletions template/.renovaterc.json.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@
"platformAutomerge": true,
"packageRules": [
{
"automerge": true,
"addLabels": [
"auto-approval"
],
"extends": [
"schedule:earlyMondays",
"schedule:automergeMonthly"
],
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"digest"
],
"automerge": true
]
},
[%- if repo_name == 'ss-pybind11' %]
{
Expand Down Expand Up @@ -80,9 +87,6 @@
"description": "Group renovate docker tag and pre-commit-hooks tag",
"groupName": "renovate group",
"addLabels": [
[%- if repo_platform == 'github' %]
"auto-approval",
[%- endif %]
"renovate"
],
"matchDatasources": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,5 @@ jobs:
jobs: {{ '${{ toJSON(needs) }}' }}

- name: Approve pr if all jobs succeeded
if: contains(github.event.pull_request.labels.*.name, 'auto-approval')
if: contains(github.event.pull_request.labels.*.name, 'auto-approval') && contains(github.actor, '[bot]')
uses: hmarr/auto-approve-action@v4
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Renovate

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/15 0-3 * * 1'
# Match renovate schedule:earlyMondays and schedule:automergeMonthly
- cron: '* 0-3 * * *'
workflow_dispatch:

jobs:
Expand Down

0 comments on commit 34116d5

Please sign in to comment.