Skip to content

Commit 31137f8

Browse files
committed
ci: add validation workflow — compose config, nginx syntax, GHCR image check
1 parent 88bbc80 commit 31137f8

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/validate.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Validate docker-compose
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
APP_IMAGE: ghcr.io/rmdes/newsdiff:main
11+
12+
jobs:
13+
validate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Validate docker-compose.yml
19+
run: docker compose config --quiet
20+
21+
- name: Check nginx config syntax
22+
run: docker run --rm -v "$PWD/nginx.conf:/etc/nginx/nginx.conf:ro" nginx:alpine nginx -t
23+
24+
- name: Verify GHCR image exists
25+
run: |
26+
echo "Checking $APP_IMAGE..."
27+
docker manifest inspect "$APP_IMAGE" > /dev/null 2>&1 && echo "Image exists" || echo "::warning::Image not found on GHCR"

0 commit comments

Comments
 (0)