Skip to content

Commit 316c15f

Browse files
committed
feat(ci): update postgres version branches on push to master
1 parent 74ca901 commit 316c15f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Update Postgres Version Branches
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
update-postgres-versions:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0 # Need full history for merging
15+
16+
- name: Set up Git
17+
run: |
18+
git config user.name "GitHub Actions"
19+
git config user.email "github-actions@github.com"
20+
21+
- name: Merge master into postgresql-15
22+
run: |
23+
git checkout postgresql-15
24+
git merge --no-ff master -m "Merge master into postgresql-15"
25+
sed -i 's/apk add postgresql[0-9]*-client/apk add postgresql15-client/g' Dockerfile
26+
git commit -am "Ensure postgresql15-client is maintained" || echo "No changes to commit"
27+
git push origin postgresql-15
28+
29+
- name: Merge master into postgresql-16
30+
run: |
31+
git checkout postgresql-16
32+
git merge --no-ff master -m "Merge master into postgresql-16"
33+
sed -i 's/apk add postgresql[0-9]*-client/apk add postgresql16-client/g' Dockerfile
34+
git commit -am "Ensure postgresql16-client is maintained" || echo "No changes to commit"
35+
git push origin postgresql-16

0 commit comments

Comments
 (0)