feat: pseudonymize db #1441
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: backend | |
| on: | |
| push: | |
| paths: | |
| - kompassi/** | |
| - kubernetes/** | |
| - .github/workflows/backend.yaml | |
| - Dockerfile | |
| - Dockerfile.static | |
| - manage.py | |
| - pyproject.toml | |
| - uv.lock | |
| - skaffold.yaml | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - kompassi/** | |
| - kubernetes/** | |
| - .github/workflows/backend.yaml | |
| - Dockerfile | |
| - Dockerfile.static | |
| - manage.py | |
| - pyproject.toml | |
| - uv.lock | |
| - skaffold.yaml | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| COMPOSE_DOCKER_CLI_BUILD: "1" | |
| UV_PYTHON_DOWNLOADS: "0" | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: docker/setup-buildx-action@v4 | |
| - run: docker compose -f docker-compose.test.yml up --exit-code-from test | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' }} | |
| env: | |
| SKAFFOLD_DEFAULT_REPO: ghcr.io/con2 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - id: cache-bin | |
| uses: actions/cache@v6 | |
| with: | |
| path: bin | |
| key: ${{ runner.os }}-bin-3 | |
| - if: steps.cache-bin.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir bin | |
| curl -Lo bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 | |
| curl -Lo bin/kubectl https://dl.k8s.io/release/v1.36.2/bin/linux/amd64/kubectl | |
| chmod +x bin/skaffold bin/kubectl | |
| - run: echo "$PWD/bin" >> $GITHUB_PATH | |
| - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/setup-buildx-action@v4 | |
| - id: build | |
| run: | | |
| # only push to ghcr.io on push to main | |
| if ! [[ "$GITHUB_EVENT_NAME" == 'push' && "$GITHUB_REF" == 'refs/heads/main' ]]; then | |
| export SKAFFOLD_PUSH=false | |
| fi | |
| skaffold build --file-output build.json | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-json | |
| path: build.json | |
| # TODO DRY | |
| deploy_staging: | |
| runs-on: qb-arc-runners | |
| needs: build | |
| environment: staging | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build-json | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - id: cache-bin | |
| uses: actions/cache@v6 | |
| with: | |
| path: bin | |
| key: ${{ runner.os }}-bin-3 | |
| - if: steps.cache-bin.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir bin | |
| curl -Lo bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 | |
| curl -Lo bin/kubectl https://dl.k8s.io/release/v1.36.2/bin/linux/amd64/kubectl | |
| chmod +x bin/skaffold bin/kubectl | |
| - run: echo "$PWD/bin" >> $GITHUB_PATH | |
| - run: node --experimental-strip-types manifest.mts | |
| working-directory: kubernetes | |
| env: | |
| ENV: staging | |
| - run: skaffold deploy -n kompassi-staging -a build.json | |
| deploy_production: | |
| runs-on: qb-arc-runners | |
| needs: build | |
| environment: production | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: build-json | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - id: cache-bin | |
| uses: actions/cache@v6 | |
| with: | |
| path: bin | |
| key: ${{ runner.os }}-bin-3 | |
| - if: steps.cache-bin.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir bin | |
| curl -Lo bin/skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 | |
| curl -Lo bin/kubectl https://dl.k8s.io/release/v1.36.2/bin/linux/amd64/kubectl | |
| chmod +x bin/skaffold bin/kubectl | |
| - run: echo "$PWD/bin" >> $GITHUB_PATH | |
| - run: node --experimental-strip-types manifest.mts | |
| working-directory: kubernetes | |
| env: | |
| ENV: production | |
| - run: skaffold deploy -n kompassi-production -a build.json |