Refactor Whitepages search to minimize direct use of ldap3 #11
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: Build | |
| on: | |
| - push | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| - name: Setup Poetry | |
| uses: abatilo/actions-poetry@v4 | |
| - name: Cache the virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pypoetry | |
| key: venv-${{ hashFiles('poetry.lock') }} | |
| - name: Install Poetry dependencies | |
| run: poetry install | |
| - name: Run black | |
| run: poetry run black --check checkpoint.py | |
| - name: Run flake8 | |
| run: poetry run flake8 checkpoint.py | |
| - name: Run pylint | |
| run: poetry run pylint checkpoint.py | |
| - name: Run mypy | |
| run: poetry run mypy --strict --scripts-are-modules checkpoint.py | |
| docker: | |
| name: Docker | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to BCDC Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: registry.bcdc.robojackets.net | |
| username: ${{ secrets.BCDC_REGISTRY_USERNAME }} | |
| password: ${{ secrets.BCDC_REGISTRY_PASSWORD }} | |
| - name: Build and push | |
| id: build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| tags: registry.bcdc.robojackets.net/checkpoint:latest | |
| network: host | |
| pull: true | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| outputs: | |
| image-digest: ${{ steps.build.outputs.digest }} | |
| deploy-production: | |
| name: Deploy | |
| needs: [lint, docker] | |
| uses: ./.github/workflows/deploy.yml | |
| concurrency: | |
| group: deploy-production | |
| cancel-in-progress: true | |
| permissions: | |
| id-token: write | |
| contents: read | |
| with: | |
| image-digest: ${{ needs.docker.outputs.image-digest }} | |
| environment: production |