Skip to content

Commit c106826

Browse files
authored
feat: Add GH workflow for Renovate (#162)
1 parent 82aa382 commit c106826

File tree

4 files changed

+39
-7
lines changed

4 files changed

+39
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,11 @@ jobs:
5050
- name: Install dependencies
5151
run: rye sync
5252

53-
# - name: Lints
54-
# run: 'pants lint ::'
55-
56-
# - name: Typecheck
57-
# run: 'pants typecheck ::'
58-
5953
- name: Tests
6054
run: rye test
6155

6256
- name: Changelog
57+
if: ${{ !contains(github.event.head_commit.author, 'renovate') }}
6358
run: rye run build changelog check
6459

6560
# - name: Upload coverage to CodeCov

.github/workflows/renovate.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Renovate
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * *'
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
jobs:
11+
renovate:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/[email protected]
16+
17+
- name: Apt install
18+
run: sudo apt-get update && sudo apt-get install -y libxmlsec1-dev
19+
20+
- uses: eifinger/setup-rye@v4
21+
id: setup-rye
22+
23+
- name: Self-hosted Renovate
24+
uses: renovatebot/[email protected]
25+
with:
26+
configurationFile: renovate-config.json
27+
token: ${{ secrets.GITHUB_TOKEN }}

renovate-config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"allowedPostUpgradeCommands": [
3+
"rye .*"
4+
]
5+
}

renovate.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"local>mitodl/.github:renovate-config"
5-
]
5+
],
6+
"postUpgradeTasks": {
7+
"commands": ["rye sync"],
8+
"fileFilters": ["requirements*.lock"],
9+
"executionMode": "update"
10+
}
611
}

0 commit comments

Comments
 (0)