Use pre-deploy feature of Render #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Update region branches' | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
update_region_branches: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
region: [oregon, frankfurt, ohio, singapore] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Replace region' | |
shell: bash | |
run: | | |
sed -i 's/region: frankfurt/region: ${{ matrix.region }}/g' render.yaml | |
- name: 'Commit and push' | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 'Update region (${{ matrix.region }})' | |
commit_options: '--allow-empty' | |
branch: region-${{ matrix.region }} | |
push_options: '--force' | |
skip_dirty_check: true | |
create_branch: true |