Skip to content

Commit f175f52

Browse files
authored
Add dpkg actions build (#2)
1 parent a694f1a commit f175f52

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
on:
2+
push:
3+
tags:
4+
- 'v*'
5+
# temp testing
6+
branches:
7+
- '*'
8+
jobs:
9+
build:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
architecture: [ 'amd64', 'arm64' ]
14+
ubuntu_version: [ 'focal', 'noble' ]
15+
runs-on: "${{ case(matrix.architecture == 'arm64', 'ubuntu-24.04-arm', 'ubuntu-24.04') }}"
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: jtdor/build-deb-action@v1
19+
with:
20+
setup-hook: |
21+
apt-get update
22+
apt-get install -y apt-transport-https ca-certificates curl
23+
install -d /usr/share/postgresql-common/pgdg
24+
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc
25+
# pg 18 doesn't exist on focal, but pglogical doesn't have a nice meta all package like postgres does
26+
if [ "${{ matrix.ubuntu_version }}" = "focal" ]; then
27+
sed -i 's/postgresql-18-pglogical,//g' debian/control
28+
fi
29+
before-build-hook: |
30+
# This should ensure pg18 is entirely stripped from the focal
31+
pg_buildext updatecontrol
32+
buildpackage-opts: --build=binary --no-sign
33+
docker-image: "ubuntu:${{ matrix.ubuntu_version }}"
34+
extra-repos: |
35+
deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://${{ case(matrix.ubuntu_version == 'focal', 'apt-archive.postgresql.org', 'apt.postgresql.org') }}/pub/repos/apt ${{ matrix.ubuntu_version }}-pgdg main
36+
- name: Upload Packages
37+
uses: actions/upload-artifact@v6
38+
with:
39+
name: deb-packages-${{ matrix.ubuntu_version }}-${{ matrix.architecture }}
40+
path: debian/artifacts

0 commit comments

Comments
 (0)