Translated using Weblate (Turkish) #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 web backend | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "web-backend/**" | |
| - ".github/workflows/web-backend.yml" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 | |
| with: | |
| version: "0.6.2" | |
| - name: Install dependencies | |
| run: | | |
| cd web-backend | |
| uv python install | |
| uv sync | |
| - name: Run tests | |
| run: | | |
| cd web-backend | |
| uv run ruff check | |
| uv run mypy . | |
| build: | |
| needs: test | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| IMAGE: ghcr.io/openinframap/web-backend | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| id: docker_build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: ./web-backend | |
| file: ./web-backend/Dockerfile | |
| push: true | |
| tags: | | |
| ${{ env.IMAGE }}:${{ github.sha }}-${{ github.run_number }} |