Setup Docker builds and optimize Dockerfile layers (#33)

* feat(ci): Setup docker builds for GUI

* refactor(ci):  Split dockerfile into layers
This commit is contained in:
Regina Fischer
2026-07-19 18:04:27 +05:30
committed by GitHub
parent 896ff6f210
commit 82fb3c34f7
4 changed files with 160 additions and 0 deletions

65
.github/workflows/build-image.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: Build Docker Image
on:
push:
branches: [master]
tags: ["v*"]
paths-ignore:
- 'web/docs/**'
- 'web/landing/**'
- 'content/**'
- 'README.md'
- 'CONTRIBUTING.md'
- '.github/workflows/deploy-docs.yml'
pull_request:
branches: [master]
paths-ignore:
- 'web/docs/**'
- 'web/landing/**'
- 'content/**'
- '*.md'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- 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 metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/omnia-gui
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=short
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: apps/gui/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false