Skip to content

Commit f2e8a3a

Browse files
committed
feat: add Renovate stack sync workflow for automated stack regeneration
1 parent 9b5c935 commit f2e8a3a

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Renovate stack sync
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
sync:
12+
name: Regenerate stacks for Renovate PRs
13+
if: github.actor == 'renovate[bot]' && github.event.pull_request.head.repo.full_name == github.repository
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Renovate branch
17+
uses: actions/checkout@v6
18+
with:
19+
ref: ${{ github.event.pull_request.head.ref }}
20+
fetch-depth: 0
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v6
24+
with:
25+
python-version: '3.x'
26+
27+
- name: Install Python deps
28+
run: pip install -r tools/requirements.txt
29+
30+
- name: Regenerate stacks
31+
run: python3 tools/generate_stacks.py
32+
33+
- name: Commit regenerated stacks when drift exists
34+
uses: stefanzweifel/git-auto-commit-action@v5
35+
with:
36+
commit_message: "chore(stacks): sync generated stacks for renovate update"
37+
file_pattern: stacks/*.yml

0 commit comments

Comments
 (0)