Skip to content

Commit

Permalink
Added workflows and license (#1)
Browse files Browse the repository at this point in the history
* Added workflows and license
  • Loading branch information
CHERTS authored Apr 13, 2024
1 parent 0978d6b commit 898bbdc
Show file tree
Hide file tree
Showing 7 changed files with 926 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.github @cherts
/.github/CODEOWNERS @cherts
/.github/workflows/** @cherts
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github: cherts
custom: ["https://paypal.me/mikhailgrigorev1981?locale.x=en_US"]
157 changes: 157 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
---
name: Default

on:
push:
paths:
- "12/**"
- "13/**"
- "14/**"
- "15/**"
- "16/**"
- "build.sh"
pull_request:
paths:
- "12/**"
- "13/**"
- "14/**"
- "15/**"
- "16/**"
- "build.sh"

jobs:
postgres-12:
runs-on: ubuntu-latest
steps:
- name: Set variables
run: |
echo "PGREPACK_VERSION=1.4.5" >> $GITHUB_ENV
echo "PG_VERSION=12" >> $GITHUB_ENV
- name: Checkout code
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
- name: Build image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
uses: docker/build-push-action@v5
with:
context: ./${{ env.PG_VERSION }}
load: true
file: ./${{ env.PG_VERSION }}/Dockerfile
platforms: linux/amd64
tags: cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Inspect image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker image inspect cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Test image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker run --rm --name pg_repack cherts/pg-repack:${{ env.PGREPACK_VERSION }} --version
postgres-13:
runs-on: ubuntu-latest
steps:
- name: Set variables
run: |
echo "PGREPACK_VERSION=1.4.6" >> $GITHUB_ENV
echo "PG_VERSION=13" >> $GITHUB_ENV
- name: Checkout code
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
- name: Build image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
uses: docker/build-push-action@v5
with:
context: ./${{ env.PG_VERSION }}
load: true
file: ./${{ env.PG_VERSION }}/Dockerfile
platforms: linux/amd64
tags: cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Inspect image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker image inspect cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Test image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker run --rm --name pg_repack cherts/pg-repack:${{ env.PGREPACK_VERSION }} --version
postgres-14:
runs-on: ubuntu-latest
steps:
- name: Set variables
run: |
echo "PGREPACK_VERSION=1.4.7" >> $GITHUB_ENV
echo "PG_VERSION=14" >> $GITHUB_ENV
- name: Checkout code
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
- name: Build image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
uses: docker/build-push-action@v5
with:
context: ./${{ env.PG_VERSION }}
load: true
file: ./${{ env.PG_VERSION }}/Dockerfile
platforms: linux/amd64
tags: cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Inspect image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker image inspect cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Test image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker run --rm --name pg_repack cherts/pg-repack:${{ env.PGREPACK_VERSION }} --version
postgres-15:
runs-on: ubuntu-latest
steps:
- name: Set variables
run: |
echo "PGREPACK_VERSION=1.4.8" >> $GITHUB_ENV
echo "PG_VERSION=15" >> $GITHUB_ENV
- name: Checkout code
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
- name: Build image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
uses: docker/build-push-action@v5
with:
context: ./${{ env.PG_VERSION }}
load: true
file: ./${{ env.PG_VERSION }}/Dockerfile
platforms: linux/amd64
tags: cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Inspect image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker image inspect cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Test image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker run --rm --name pg_repack cherts/pg-repack:${{ env.PGREPACK_VERSION }} --version
postgres-16:
runs-on: ubuntu-latest
steps:
- name: Set variables
run: |
echo "PGREPACK_VERSION=1.5.0" >> $GITHUB_ENV
echo "PG_VERSION=16" >> $GITHUB_ENV
- name: Checkout code
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
- name: Build image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
uses: docker/build-push-action@v5
with:
context: ./${{ env.PG_VERSION }}
load: true
file: ./${{ env.PG_VERSION }}/Dockerfile
platforms: linux/amd64
tags: cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Inspect image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker image inspect cherts/pg-repack:${{ env.PGREPACK_VERSION }}
- name: Test image cherts/pg-repack:${{ env.PGREPACK_VERSION }}
run: |
docker run --rm --name pg_repack cherts/pg-repack:${{ env.PGREPACK_VERSION }} --version
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Release

on:
workflow_dispatch:
push:
tags:
- "v1.*"

jobs:
Build:
name: Build-Docker
runs-on: ubuntu-latest
steps:
- name: Checkout code
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

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true

- name: Build and push image cherts/pg-repack:1.4.5
uses: docker/build-push-action@v5
with:
push: true
cache-from: type=gha,scope=pg-repack
cache-to: type=gha,mode=max,scope=pg-repack
context: ./12
file: ./12/Dockerfile
platforms: linux/amd64,linux/arm64
tags: cherts/pg-repack:1.4.5

- name: Build and push image cherts/pg-repack:1.4.6
uses: docker/build-push-action@v5
with:
push: true
cache-from: type=gha,scope=pg-repack
cache-to: type=gha,mode=max,scope=pg-repack
context: ./13
file: ./13/Dockerfile
platforms: linux/amd64,linux/arm64
tags: cherts/pg-repack:1.4.6

- name: Build and push image cherts/pg-repack:1.4.7
uses: docker/build-push-action@v5
with:
push: true
cache-from: type=gha,scope=pg-repack
cache-to: type=gha,mode=max,scope=pg-repack
context: ./14
file: ./14/Dockerfile
platforms: linux/amd64,linux/arm64
tags: cherts/pg-repack:1.4.7

- name: Build and push image cherts/pg-repack:1.4.8
uses: docker/build-push-action@v5
with:
push: true
cache-from: type=gha,scope=pg-repack
cache-to: type=gha,mode=max,scope=pg-repack
context: ./15
file: ./15/Dockerfile
platforms: linux/amd64,linux/arm64
tags: cherts/pg-repack:1.4.8

- name: Build and push image cherts/pg-repack:1.5.0
uses: docker/build-push-action@v5
with:
push: true
cache-from: type=gha,scope=pg-repack
cache-to: type=gha,mode=max,scope=pg-repack
context: ./16
file: ./16/Dockerfile
platforms: linux/amd64,linux/arm64
tags: cherts/pg-repack:1.5.0
2 changes: 1 addition & 1 deletion 16/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ RUN set -eux; \
--enable-tap-tests \
--disable-rpath \
--with-uuid=e2fs \
--with-gnu-ld \
--with-pgport=5432 \
--with-system-tzdata=/usr/share/zoneinfo \
--prefix=/usr/local \
Expand All @@ -87,6 +86,7 @@ RUN set -eux; \
--with-icu \
--with-llvm \
--with-lz4 \
--with-zstd \
; \
make -j "$(nproc)" world; \
make install-world; \
Expand Down
Loading

0 comments on commit 898bbdc

Please sign in to comment.