This repository was archived by the owner on Aug 21, 2026. It is now read-only.
Bump next from 15.5.9 to 16.1.5 in /website #131
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: DNS Server Release | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| env: | |
| PYTHON_VERSION: '3.13' | |
| jobs: | |
| # Test job runs on PRs and main pushes | |
| test: | |
| name: Test DNS Server | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build complete DNS Server application image for testing | |
| run: | | |
| docker build -f dns-server/Dockerfile --build-arg SQUAWK_ENV=test -t squawk-dns-server:release-test dns-server/ | |
| - name: Run unit tests on complete application image | |
| run: | | |
| if [ -d dns-server/tests ]; then | |
| docker run --rm -w /app/dns-server squawk-dns-server:release-test python3.13 -m pytest tests/ -v --cov=bins --cov-report=term-missing --tb=short | |
| else | |
| echo "No tests found, skipping test execution" | |
| fi | |
| - name: Run security scans on complete application image | |
| run: | | |
| docker run --rm -w /app/dns-server squawk-dns-server:release-test python3.13 -m bandit -r bins/ -f json || true | |
| docker run --rm -w /app/dns-server squawk-dns-server:release-test python3.13 -m safety check || true | |
| - name: Run linting on complete application image | |
| run: | | |
| docker run --rm -w /app/dns-server squawk-dns-server:release-test python3.13 -m flake8 bins/ --count --select=E9,F63,F7,F82 --show-source --statistics || true | |
| docker run --rm -w /app/dns-server squawk-dns-server:release-test python3.13 -m flake8 bins/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics || true | |
| # Build and release job only runs on main branch pushes | |
| build-and-release: | |
| name: Build and Release DNS Server | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Read version from .version file | |
| id: version | |
| run: | | |
| VERSION=$(cat .version | tr -d '\n' | sed 's/^v//') | |
| echo "VERSION=$VERSION" >> $GITHUB_OUTPUT | |
| echo "TAG=v$VERSION-server" >> $GITHUB_OUTPUT | |
| echo "Version: $VERSION" | |
| - name: Check if server tag exists | |
| id: tag_check | |
| run: | | |
| if git rev-parse "v${{ steps.version.outputs.VERSION }}-server" >/dev/null 2>&1; then | |
| echo "EXISTS=true" >> $GITHUB_OUTPUT | |
| echo "Server tag v${{ steps.version.outputs.VERSION }}-server already exists, skipping release" | |
| else | |
| echo "EXISTS=false" >> $GITHUB_OUTPUT | |
| echo "Server tag v${{ steps.version.outputs.VERSION }}-server does not exist, proceeding with release" | |
| fi | |
| # Docker build and push for server components | |
| - name: Set up Docker Buildx | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GitHub Container Registry | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Build and push DNS Server Docker images | |
| - name: Build and push DNS Server Docker image (Development) | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: dns-server | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| penguincloud/squawk-dns-server:${{ steps.version.outputs.VERSION }} | |
| penguincloud/squawk-dns-server:latest | |
| ghcr.io/${{ github.repository }}-server:${{ steps.version.outputs.VERSION }} | |
| ghcr.io/${{ github.repository }}-server:latest | |
| labels: | | |
| org.opencontainers.image.title=Squawk DNS Server | |
| org.opencontainers.image.description=DNS-over-HTTPS server with web console and authentication | |
| org.opencontainers.image.version=${{ steps.version.outputs.VERSION }} | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| - name: Build and push DNS Server Production Docker image | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: production | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| penguincloud/squawk-dns-server-prod:${{ steps.version.outputs.VERSION }} | |
| penguincloud/squawk-dns-server-prod:latest | |
| ghcr.io/${{ github.repository }}-server-prod:${{ steps.version.outputs.VERSION }} | |
| ghcr.io/${{ github.repository }}-server-prod:latest | |
| labels: | | |
| org.opencontainers.image.title=Squawk DNS Server (Production) | |
| org.opencontainers.image.description=Production-optimized DNS-over-HTTPS server | |
| org.opencontainers.image.version=${{ steps.version.outputs.VERSION }} | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| - name: Build and push DNS Client Python Docker image | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: dns-client | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| penguincloud/squawk-dns-client-python:${{ steps.version.outputs.VERSION }} | |
| penguincloud/squawk-dns-client-python:latest | |
| ghcr.io/${{ github.repository }}-client-python:${{ steps.version.outputs.VERSION }} | |
| ghcr.io/${{ github.repository }}-client-python:latest | |
| labels: | | |
| org.opencontainers.image.title=Squawk DNS Client (Python) | |
| org.opencontainers.image.description=Python DNS-over-HTTPS client with local forwarding | |
| org.opencontainers.image.version=${{ steps.version.outputs.VERSION }} | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| - name: Build and push Testing Docker image | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| target: testing | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| penguincloud/squawk-dns-testing:${{ steps.version.outputs.VERSION }} | |
| penguincloud/squawk-dns-testing:latest | |
| ghcr.io/${{ github.repository }}-testing:${{ steps.version.outputs.VERSION }} | |
| ghcr.io/${{ github.repository }}-testing:latest | |
| labels: | | |
| org.opencontainers.image.title=Squawk DNS Testing | |
| org.opencontainers.image.description=Testing environment with comprehensive test suite | |
| org.opencontainers.image.version=${{ steps.version.outputs.VERSION }} | |
| org.opencontainers.image.source=https://github.com/${{ github.repository }} | |
| org.opencontainers.image.revision=${{ github.sha }} | |
| # Extract release notes from RELEASE_NOTES.md | |
| - name: Extract Release Notes | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| run: | | |
| chmod +x .github/scripts/extract-release-notes.sh | |
| GITHUB_REPOSITORY="${{ github.repository }}" \ | |
| GITHUB_SHA="${{ github.sha }}" \ | |
| .github/scripts/extract-release-notes.sh server "${{ steps.version.outputs.VERSION }}" release_body.md | |
| # Create GitHub Release for server | |
| - name: Create Server Release | |
| if: steps.tag_check.outputs.EXISTS == 'false' | |
| uses: actions/create-release@v1 | |
| id: create_release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.version.outputs.TAG }} | |
| release_name: Squawk DNS Server v${{ steps.version.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| body_path: release_body.md | |
| # Notification job | |
| notify: | |
| name: Notify Server Release | |
| runs-on: ubuntu-latest | |
| needs: build-and-release | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Server Release Summary | |
| run: | | |
| echo "✅ Squawk DNS Server Release Complete!" | |
| echo "Version: $(cat .version)" | |
| echo "Docker Images: DNS Server (Dev), DNS Server (Prod), Python Client, Testing" | |
| echo "Features: mTLS, MFA, SSO, DNS Blackholing, Redis Caching, Web Console" | |
| echo "Registries: Docker Hub (penguincloud/*) and GitHub Container Registry" | |
| echo "Tag: v$(cat .version | tr -d '\n' | sed 's/^v//')-server" |