diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cfb15df --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: CI + +on: + push: + +permissions: + contents: write + packages: write + +env: + DOCKER_REPO: ghcr.io/${{ github.repository_owner }}/pgpool + +jobs: + publish_docker: + runs-on: ubuntu-latest + timeout-minutes: 20 + + strategy: + fail-fast: false + matrix: + version: ['4.4.12', '4.5.7', '4.6.2'] + steps: + - uses: actions/checkout@v4 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + + - name: Login to Github Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push images + uses: docker/build-push-action@v6 + with: + context: ./pgpool.docker/ + file: ./pgpool.docker/Dockerfile.pgpool + build-args: | + PGPOOL_VER=${{ matrix.version }} + push: true + platforms: linux/amd64,linux/arm64 + tags: | + ${{ env.DOCKER_REPO }}:${{ matrix.version }} diff --git a/pgpool.docker/Dockerfile.pgpool b/pgpool.docker/Dockerfile.pgpool index f9ba0e7..35b3bd4 100644 --- a/pgpool.docker/Dockerfile.pgpool +++ b/pgpool.docker/Dockerfile.pgpool @@ -1,6 +1,7 @@ -FROM alpine:3.17 +ARG ALPINE=3.20 +FROM alpine:${ALPINE} -ARG PGPOOL_VER +ARG PGPOOL_VER=4.4.8 ENV PGPOOL_INSTALL_DIR /opt/pgpool-II ENV PGPOOL_CONF_VOLUME /config