Skip to content

Commit fee8326

Browse files
omar-harisclaude
andcommitted
feat: Add CI/CD workflow and standalone admin documentation
- Add GitHub Actions workflow to build and push Docker image to ghcr.io - Create comprehensive standalone admin usage guide - Add .env.example for pgpool-admin configuration - Update README with reference to standalone guide - Use shorter image name: pgpool-dashboard The workflow will automatically build multi-arch images (amd64/arm64) and push to GitHub Container Registry on commits to main branch. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 9e23e23 commit fee8326

File tree

4 files changed

+475
-0
lines changed

4 files changed

+475
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'pgpool-admin/**'
8+
- '.github/workflows/docker-build.yml'
9+
pull_request:
10+
branches: [ main ]
11+
paths:
12+
- 'pgpool-admin/**'
13+
- '.github/workflows/docker-build.yml'
14+
workflow_dispatch:
15+
16+
env:
17+
REGISTRY: ghcr.io
18+
IMAGE_NAME: ${{ github.repository_owner }}/pgpool-dashboard
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Log in to the Container registry
35+
if: github.event_name != 'pull_request'
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
42+
- name: Extract metadata
43+
id: meta
44+
uses: docker/metadata-action@v5
45+
with:
46+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
47+
tags: |
48+
type=ref,event=branch
49+
type=ref,event=pr
50+
type=semver,pattern={{version}}
51+
type=semver,pattern={{major}}.{{minor}}
52+
type=raw,value=latest,enable={{is_default_branch}}
53+
type=sha,prefix={{branch}}-
54+
55+
- name: Build and push Docker image
56+
uses: docker/build-push-action@v5
57+
with:
58+
context: ./pgpool-admin
59+
push: ${{ github.event_name != 'pull_request' }}
60+
tags: ${{ steps.meta.outputs.tags }}
61+
labels: ${{ steps.meta.outputs.labels }}
62+
cache-from: type=gha
63+
cache-to: type=gha,mode=max
64+
platforms: linux/amd64,linux/arm64
65+
66+
- name: Generate SBOM
67+
if: github.event_name != 'pull_request'
68+
uses: anchore/sbom-action@v0
69+
with:
70+
image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
71+
format: spdx-json
72+
output-file: sbom.spdx.json
73+
74+
- name: Upload SBOM
75+
if: github.event_name != 'pull_request'
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: sbom
79+
path: sbom.spdx.json

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ A PostgreSQL cluster setup with master-replica replication, PgPool-II load balan
3131

3232
## Quick Start
3333

34+
> **💡 Using PgPool Admin Only?** See [Standalone Admin Guide](docs/STANDALONE_ADMIN.md) for monitoring your existing PostgreSQL/PgPool infrastructure.
35+
3436
### Prerequisites
3537

3638
- Docker and Docker Compose v2.0+

0 commit comments

Comments
 (0)