Skip to content

feat(docker): unified multi-target Dockerfile with GHCR pre-built images #1

feat(docker): unified multi-target Dockerfile with GHCR pre-built images

feat(docker): unified multi-target Dockerfile with GHCR pre-built images #1

Workflow file for this run

name: Docker Images
on:
push:
branches: [main, selem/docker-for-all]
paths:
- 'docker/**'
- 'docker-compose.yaml'
- 'pnpm-lock.yaml'
- 'cloud/**'
- 'dashboard/**'
- 'core/**'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push cloud-backend
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
target: cloud-backend
push: true
tags: ghcr.io/fireproof-storage/fireproof/cloud-backend:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push dashboard
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
target: dashboard
push: true
tags: ghcr.io/fireproof-storage/fireproof/dashboard:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push todo-app
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
target: todo-app
push: true
tags: ghcr.io/fireproof-storage/fireproof/todo-app:latest
cache-from: type=gha
cache-to: type=gha,mode=max