From 3b822d5cb435ecdd5607bb00244bb5b6e0fec752 Mon Sep 17 00:00:00 2001 From: Guido X Jansen Date: Sat, 14 Feb 2026 15:13:07 +0100 Subject: [PATCH] ci: add compose validation workflow and Dependabot config (#7) - validate-compose.yml: validates all 3 compose files (dev, prod, global) and checks shell script syntax on every push and PR - dependabot.yml: weekly updates for GitHub Actions and Docker Compose base images --- .github/dependabot.yml | 21 +++++++++ .github/workflows/validate-compose.yml | 60 ++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/validate-compose.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d2ac243 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +version: 2 +updates: + # Monitor GitHub Actions for updates + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + - "ci" + + # Monitor Docker base images for updates + - package-ecosystem: "docker-compose" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + - "docker" diff --git a/.github/workflows/validate-compose.yml b/.github/workflows/validate-compose.yml new file mode 100644 index 0000000..fa1d553 --- /dev/null +++ b/.github/workflows/validate-compose.yml @@ -0,0 +1,60 @@ +name: Validate Compose + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + validate: + name: Validate Docker Compose + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Validate dev compose + run: docker compose -f docker-compose.dev.yml config --quiet + + - name: Validate production compose + env: + POSTGRES_USER: barazo + POSTGRES_PASSWORD: ci_test + POSTGRES_DB: barazo + VALKEY_PASSWORD: ci_test + DATABASE_URL: postgresql://barazo:ci_test@postgres:5432/barazo + TAP_ADMIN_PASSWORD: ci_test + COMMUNITY_DID: did:plc:ci-test + COMMUNITY_NAME: CI Test + COMMUNITY_DOMAIN: ci.example.com + OAUTH_CLIENT_ID: https://ci.example.com + OAUTH_REDIRECT_URI: https://ci.example.com/api/auth/callback + NEXT_PUBLIC_API_URL: https://ci.example.com/api + NEXT_PUBLIC_SITE_URL: https://ci.example.com + run: docker compose -f docker-compose.yml config --quiet + + - name: Validate global compose overlay + env: + POSTGRES_USER: barazo + POSTGRES_PASSWORD: ci_test + POSTGRES_DB: barazo + VALKEY_PASSWORD: ci_test + DATABASE_URL: postgresql://barazo:ci_test@postgres:5432/barazo + TAP_ADMIN_PASSWORD: ci_test + COMMUNITY_DID: did:plc:ci-test + COMMUNITY_NAME: CI Test + COMMUNITY_DOMAIN: ci.example.com + OAUTH_CLIENT_ID: https://ci.example.com + OAUTH_REDIRECT_URI: https://ci.example.com/api/auth/callback + NEXT_PUBLIC_API_URL: https://ci.example.com/api + NEXT_PUBLIC_SITE_URL: https://ci.example.com + run: docker compose -f docker-compose.yml -f docker-compose.global.yml config --quiet + + - name: Check shell scripts syntax + run: | + bash -n scripts/backup.sh + bash -n scripts/restore.sh + bash -n scripts/smoke-test.sh -- 2.51.2