Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 64 additions & 61 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,86 +4,89 @@ on:
branches:
- main
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- run: |
make lint
build-bitnami:
strategy:
matrix:
image:
[
{ base: bitnami/postgresql, tag: latest },
{ base: bitnami/postgresql, tag: 14 },
{ base: bitnami/postgresql, tag: 14.5.0 },
]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: helm/[email protected]
with:
cluster_name: kind
- name: set-env
run: |
BASE=${{ matrix.image.base }}
TAG=${{ matrix.image.tag }}
NEW_TAG=$(echo "$BASE-$TAG" | sed -E 's/[^A-Za-z0-9_.-]/-/g')
ARCH=linux/amd64
echo "BASE=$BASE" >> $GITHUB_ENV
echo "TAG=$TAG" >> $GITHUB_ENV
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
echo "ARCH=$ARCH" >> $GITHUB_ENV
- name: build
run: |
make -e build
- name: create extension test
run: |
bash test/create-extension/run.sh
- name: create extension status
if: ${{ always() }}
run: |
bash test/create-extension/status.sh
- name: load images to kind
run: |
kind load docker-image lyra95/postgres-bigm:"${NEW_TAG}"
- name: read replica test
run: |
bash test/read-replica/run.sh
- name: read replica status
if: ${{ always() }}
run: |
bash test/read-replica/status.sh
# lint:
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: "16"
# - run: |
# make lint
# build-bitnami:
# strategy:
# matrix:
# image:
# [
# { base: bitnami/postgresql, tag: latest },
# { base: bitnami/postgresql, tag: 14 },
# { base: bitnami/postgresql, tag: 14.5.0 },
# ]
# env:
# ARCH: linux/amd64
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v3
# - uses: docker/setup-buildx-action@v2
# - uses: helm/kind[email protected]
# with:
# cluster_name: kind
# - name: set-env
# run: |
# BASE=${{ matrix.image.base }}
# TAG=${{ matrix.image.tag }}
# NEW_TAG=$(echo "$BASE-$TAG" | sed -E 's/[^A-Za-z0-9_.-]/-/g')
# echo "BASE=$BASE" >> $GITHUB_ENV
# echo "TAG=$TAG" >> $GITHUB_ENV
# echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
# - name: build
# run: |
# make -e build
# - name: create extension test
# run: |
# bash test/create-extension/run.sh
# - name: create extension status
# if: ${{ always() }}
# run: |
# bash test/create-extension/status.sh
# - name: load images to kind
# run: |
# kind load docker-image lyra95/postgres-bigm:"${NEW_TAG}"
# - name: read replica test
# run: |
# bash test/read-replica/run.sh
# - name: read replica status
# if: ${{ always() }}
# run: |
# bash test/read-replica/status.sh
build-official:
strategy:
matrix:
image:
[
{ base: postgres, tag: bullseye },
image: [
# { base: postgres, tag: bullseye },
{ base: postgres, tag: 14-bullseye },
{ base: postgres, tag: 14.5-bullseye },
# { base: postgres, tag: 14.5-bullseye },
]
env:
ARCH: linux/arm64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: set-env
run: |
BASE=${{ matrix.image.base }}
TAG=${{ matrix.image.tag }}
NEW_TAG=$(echo "$BASE-$TAG" | sed -E 's/[^A-Za-z0-9_.-]/-/g')
POSTGRESQL_BUILD_PKG_VERSION=$(echo $TAG | sed -E 's/([0-9]*).*/\1/g')
ARCH=linux/amd64
echo "BASE=$BASE" >> $GITHUB_ENV
echo "TAG=$TAG" >> $GITHUB_ENV
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
echo "POSTGRESQL_BUILD_PKG_VERSION=${POSTGRESQL_BUILD_PKG_VERSION:-all}" >> $GITHUB_ENV
echo "ARCH=$ARCH" >> $GITHUB_ENV
- name: build
run: |
make -e build
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
{ base: bitnami/postgresql, tag: 14 },
{ base: bitnami/postgresql, tag: 14.5.0 },
]
env:
ARCH: linux/amd64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand All @@ -26,11 +28,9 @@ jobs:
BASE=${{ matrix.image.base }}
TAG=${{ matrix.image.tag }}
NEW_TAG=$(echo "$BASE-$TAG" | sed -E 's/[^A-Za-z0-9_.-]/-/g')
ARCH=linux/amd64
echo "BASE=$BASE" >> $GITHUB_ENV
echo "TAG=$TAG" >> $GITHUB_ENV
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
echo "ARCH=$ARCH" >> $GITHUB_ENV
- run: |
make -e push
build-and-push-official:
Expand All @@ -42,10 +42,16 @@ jobs:
{ base: postgres, tag: 14-bullseye },
{ base: postgres, tag: 14.5-bullseye },
]
env:
ARCH: linux/amd64,linux/arm64
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- uses: docker/login-action@v2
with:
username: lyra95
Expand All @@ -56,11 +62,9 @@ jobs:
TAG=${{ matrix.image.tag }}
NEW_TAG=$(echo "$BASE-$TAG" | sed -E 's/[^A-Za-z0-9_.-]/-/g')
POSTGRESQL_BUILD_PKG_VERSION=$(echo $TAG | sed -E 's/([0-9]*).*/\1/g')
ARCH=linux/amd64
echo "BASE=$BASE" >> $GITHUB_ENV
echo "TAG=$TAG" >> $GITHUB_ENV
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
echo "POSTGRESQL_BUILD_PKG_VERSION=${POSTGRESQL_BUILD_PKG_VERSION:-all}" >> $GITHUB_ENV
echo "ARCH=$ARCH" >> $GITHUB_ENV
- run: |
make -e push