name: Docker Publish on: push: branches: - main paths: - 'apps/api/**' - 'apps/desktop/resources/drizzle/**' - 'apps/web/**' - 'packages/**' - 'pnpm-lock.yaml' - 'pnpm-workspace.yaml' - 'package.json' - '.github/workflows/docker-publish.yml' workflow_dispatch: jobs: docker: runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - app: api dockerfile: apps/api/Dockerfile image_suffix: api - app: web dockerfile: apps/web/Dockerfile image_suffix: web permissions: contents: read packages: write steps: - name: Check out repository uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - 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 image metadata id: meta uses: docker/metadata-action@v5 with: images: ghcr.io/${{ github.repository_owner }}/vidbee-${{ matrix.image_suffix }} tags: | type=raw,value=latest,enable={{is_default_branch}} type=sha,format=short - name: Build and push image uses: docker/build-push-action@v6 with: context: . file: ${{ matrix.dockerfile }} platforms: linux/amd64,linux/arm64 push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | VITE_API_URL=${{ vars.VITE_API_URL || 'http://localhost:3100' }}