Skip to content
Merged
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
79 changes: 79 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: "🩺 PR Validation"

on:
pull_request:
branches: ["master"]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
pre-build-check:
name: 🔍 Pre-Build Security & Quality
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: 🐳 Lint Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: Dockerfile
failure-threshold: error

- name: 🛡️ Scan FS for Secrets and Configs
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
scan-ref: '.'
scanners: 'vuln,secret,config'
hide-progress: true
format: 'table'
exit-code: '1'
severity: 'CRITICAL,HIGH'

- name: 🏗️ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'

- name: 📦 Install dependencies
run: npm ci --legacy-peer-deps

- name: 🧹 Lint Check
run: npm run lint

build-test:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment on lines +13 to +48
name: ⚙️ Test Docker Build
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v4

- name: 🤖 Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short,prefix=

- name: ⚙️ Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 🚀 Build (Dry Run)
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
NEXT_PUBLIC_BUILD_VERSION=${{ steps.meta.outputs.version }}
Loading