fix: add frontend build stage to Dockerfile #20
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
| # Copyright (c) 2026 Veritas Aequitas Holdings LLC. All rights reserved. | |
| # | |
| # Build and push Docker images to GitHub Container Registry (ghcr.io). | |
| # Tags: latest for main, semver tags for releases. | |
| name: Docker | |
| on: | |
| push: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| # ── Build and push Docker image to ghcr.io ─────────────────────────── | |
| build-and-push: | |
| name: Build & Push | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| attestations: write | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/ap6pack/malwar | |
| tags: | | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| labels: | | |
| org.opencontainers.image.title=malwar | |
| org.opencontainers.image.description=Malware detection engine for agentic AI skill files | |
| org.opencontainers.image.url=https://github.com/Ap6pack/malwar | |
| org.opencontainers.image.source=https://github.com/Ap6pack/malwar | |
| org.opencontainers.image.vendor=Veritas Aequitas Holdings LLC | |
| org.opencontainers.image.licenses=BSL-1.1 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| platforms: linux/amd64 | |
| provenance: false |