Fix health endpoint #3
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 and Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.11" | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Docker image | |
| env: | |
| DOCKER_IMAGE: ghcr.io/openbudget/budgetkey-mcp | |
| GITHUB_SHA: ${{ github.sha }} | |
| run: | | |
| docker build -t ${DOCKER_IMAGE}:latest -t ${DOCKER_IMAGE}:${GITHUB_SHA} . | |
| - name: Push Docker image | |
| env: | |
| DOCKER_IMAGE: ghcr.io/openbudget/budgetkey-mcp | |
| GITHUB_SHA: ${{ github.sha }} | |
| run: | | |
| docker push ${DOCKER_IMAGE}:latest | |
| docker push ${DOCKER_IMAGE}:${GITHUB_SHA} | |
| - name: Update Kubernetes deployment | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.K8S_GITHUB_TOKEN }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| DOCKER_IMAGE: ghcr.io/openbudget/budgetkey-mcp | |
| run: | | |
| docker run -e CLONE_PARAMS="--branch master https://github.com/OpenBudget/budgetkey-k8s.git" \ | |
| -e YAML_UPDATE_JSON='{"mcp":{"image":"'"${DOCKER_IMAGE}:${GITHUB_SHA}"'"}}' \ | |
| -e YAML_UPDATE_FILE="values.auto-updated.yaml" \ | |
| -e GIT_USER_EMAIL="budgetkey-deployer@null.void" \ | |
| -e GIT_USER_NAME="budgetkey-deployer" \ | |
| -e GIT_COMMIT_MESSAGE="automatic update of budgetkey-mcp" \ | |
| -e PUSH_PARAMS="https://${GITHUB_TOKEN}@github.com/OpenBudget/budgetkey-k8s.git master" \ | |
| orihoch/github_yaml_updater |