Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/build-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ name: 🐳 Build Containers
on:
release:
types: [published]
push:
branches: [main, master]
paths:
- 'VERSION'
- 'frontend/package.json'
- 'backend/go.mod'
workflow_run:
workflows: ["🚀 Release Management"]
types: [completed]
branches: [main, master]
workflow_dispatch:
inputs:
tag:
Expand All @@ -22,6 +32,7 @@ jobs:
build-and-push:
name: 🐳 Build & Push Images
runs-on: ubuntu-latest
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'

strategy:
matrix:
Expand Down Expand Up @@ -99,7 +110,7 @@ jobs:
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ github.sha }}
BUILD_DATE=${{ github.event.head_commit.timestamp || github.event.release.created_at }}
BUILD_DATE=${{ github.event.head_commit.timestamp || github.event.release.created_at || github.event.repository.pushed_at }}

- name: Build and push (Frontend)
if: matrix.component == 'frontend'
Expand All @@ -125,7 +136,7 @@ jobs:

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
if: always() && hashFiles('trivy-results.sarif') != ''
with:
sarif_file: 'trivy-results.sarif'

Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23-alpine@sha256:383395b794dffa5b53012a212365d40c8e37109a626ca30d6151c8348d380b5f AS builder
FROM golang:1.24-alpine AS builder

# Add security updates and build tools
RUN apk --no-cache add git ca-certificates tzdata
Expand Down
4 changes: 2 additions & 2 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ WORKDIR /app
# Copy package files first for better caching
COPY package*.json ./

# Install dependencies with clean install
RUN npm ci --only=production --no-audit --no-fund
# Install dependencies with clean install (including dev dependencies for build)
RUN npm ci --no-audit --no-fund

# Copy source code
COPY . .
Expand Down
Loading