Skip to content

Commit

Permalink
add github ci workflow for postgres 17
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjimmy committed Sep 30, 2024
1 parent 9131134 commit cc98ca8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/postgress12_16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,31 @@ jobs:
name: Run bash script to verify image postgres:16-dev
run: docker pull localhost:5000/postgres:16-dev && docker tag localhost:5000/postgres:16-dev postgres:16-dev && chmod +x ./postgres-16.sh && ./postgres-16.sh

PostgreSQL-17:
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
build-args: POSTGRES_VERSION=17
file: Dockerfile_alpine
tags: localhost:5000/postgres:dev
-
name: Run bash script to verify image postgres:dev
run: docker pull localhost:5000/postgres:dev && docker tag localhost:5000/postgres:dev postgres:dev && chmod +x ./postgres-1x.sh && ./postgres-1x.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
*.o
*.so
.vscode
.cache
10 changes: 5 additions & 5 deletions Dockerfile_alpine
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

ARG POSTGRES_VERSION=16
FROM postgres:$POSTGRES_VERSION-alpine3.18 as build
FROM postgres:$POSTGRES_VERSION-alpine as build
ARG POSTGRES_VERSION=16
RUN apk update && apk add musl-dev icu-dev llvm15-dev clang15 make

Expand All @@ -13,8 +13,8 @@ COPY pg_cjk_parser--0.0.1.sql /root/parser/
COPY zht2zhs.h /root/parser/
RUN make clean && make install

FROM postgres:$POSTGRES_VERSION-alpine3.18
FROM postgres:$POSTGRES_VERSION-alpine
COPY --from=build /root/parser/pg_cjk_parser.bc /usr/local/lib/postgresql/bitcode
COPY --from=build /root/parser/pg_cjk_parser.so /usr/local/lib/postgresql
COPY --from=build /root/parser/pg_cjk_parser--0.0.1.sql /usr/local/share/postgresql/extension
COPY --from=build /root/parser/pg_cjk_parser.control /usr/local/share/postgresql/extension
COPY --from=build /root/parser/pg_cjk_parser.so /usr/local/lib/postgresql/
COPY --from=build /root/parser/pg_cjk_parser--0.0.1.sql /usr/local/share/postgresql/extension/
COPY --from=build /root/parser/pg_cjk_parser.control /usr/local/share/postgresql/extension/
2 changes: 1 addition & 1 deletion pg_cjk_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -3006,4 +3006,4 @@ prsd2_zht2zhs(PG_FUNCTION_ARGS)
}

PG_RETURN_TEXT_P(zhs_text);
}
}

0 comments on commit cc98ca8

Please sign in to comment.