Skip to content

chore(deps): update actions/checkout action to v7 #55

chore(deps): update actions/checkout action to v7

chore(deps): update actions/checkout action to v7 #55

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@v2
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