-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.33 KB
/
Copy pathrenovate-stack-sync.yml
File metadata and controls
46 lines (38 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Renovate stack sync
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: write
jobs:
sync:
name: Regenerate stacks for Renovate PRs
if: github.actor == 'renovate[bot]' && github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Generate app token
uses: actions/create-github-app-token@v3
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout Renovate branch
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install Python deps
run: pip install -r tools/requirements.txt
- name: Regenerate stacks
run: python3 tools/generate_stacks.py
- name: Commit regenerated stacks when drift exists
uses: stefanzweifel/git-auto-commit-action@v7
with:
token: ${{ steps.app-token.outputs.token }}
commit_message: "chore(stacks): sync generated stacks for renovate update"
file_pattern: stacks/*.yml