chore: heygermany customer project
Some checks failed
Main / Setup and Test (push) Has been cancelled
Main / Build Website (push) Has been cancelled

This commit is contained in:
e2e
2026-07-11 09:21:21 +02:00
commit 59b4a7a404
398 changed files with 38340 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
name: Detect Changes
description: Detect changed files and handle [deploy-all] commit override
outputs:
api:
description: Whether API changed
value: ${{ steps.override.outputs.api }}
dbmigrate:
description: Whether DBMigrate changed
value: ${{ steps.override.outputs.dbmigrate }}
website:
description: Whether WebSite changed
value: ${{ steps.override.outputs.website }}
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: generated-code
path: ${{ github.workspace }}
- id: filter
uses: dorny/paths-filter@v3
with:
filters: |
api:
- 'backends/express/**'
- 'sql/**'
- 'packages/**'
website:
- 'apps/website/**'
- 'packages/**'
- id: override
shell: bash
run: |
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
FORCE_PUSH="${{ github.event.forced }}"
echo "Commit message: $COMMIT_MESSAGE"
echo "Forced push: $FORCE_PUSH"
# Temporarily always return true for all services
echo "api=true" >> $GITHUB_OUTPUT
echo "website=true" >> $GITHUB_OUTPUT
# if [ "$FORCE_PUSH" = "true" ] || echo "$COMMIT_MESSAGE" | grep -q "\[deploy-all\]"; then
# echo "api=true" >> $GITHUB_OUTPUT
# echo "website=true" >> $GITHUB_OUTPUT
# else
# echo "api=${{ steps.filter.outputs.api }}" >> $GITHUB_OUTPUT
# echo "website=${{ steps.filter.outputs.website }}" >> $GITHUB_OUTPUT
# fi

View File

@@ -0,0 +1,67 @@
name: Build and Push to ECR
description: Fully prepares, builds, and pushes a Docker image to AWS ECR.
inputs:
dockerfile:
description: 'Path to Dockerfile'
required: true
image-name:
description: 'ECR repo name (e.g. api or dbmigrate)'
required: true
aws-region:
description: 'AWS region'
required: true
aws-access-key-id:
description: 'AWS Access Key ID'
required: true
aws-secret-access-key:
description: 'AWS Secret Access Key'
required: true
github-sha:
description: 'Commit SHA to tag the image with'
default: ${{ github.sha }}
outputs:
ecr_image:
description: 'Final ECR image URI'
value: ${{ steps.build.outputs.ecr_image }}
runs:
using: composite
steps:
- name: Setup AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: ${{ inputs.aws-region }}
- name: Login to Amazon ECR
id: ecr-login
uses: aws-actions/amazon-ecr-login@v1
- name: Download generated files
uses: actions/download-artifact@v4
with:
name: generated-code
path: ${{ github.workspace }}
- name: List generated files
shell: bash
run: |
echo "Listing .gen.ts and .gen.d.ts files:"
pwd
find . -name "*.gen.ts" -o -name "*.gen.d.ts"
- name: Build and Push Docker Image
shell: bash
id: build
run: |
IMAGE_URI=${{ steps.ecr-login.outputs.registry }}/${{ inputs.image-name }}:${{ inputs.github-sha }}
docker build -t $IMAGE_URI -f ${{ inputs.dockerfile }} .
docker tag $IMAGE_URI ${{ steps.ecr-login.outputs.registry }}/${{ inputs.image-name }}:latest
docker push $IMAGE_URI
docker push ${{ steps.ecr-login.outputs.registry }}/${{ inputs.image-name }}:latest
# Safe base64 encode and output
IMAGE_URI_BASE64=$(echo -n "$IMAGE_URI" | base64 | tr -d '\n')
echo "ecr_image=$IMAGE_URI_BASE64" >> $GITHUB_OUTPUT

View File

@@ -0,0 +1,45 @@
name: 'Setup Environment'
description: 'Setup environment for the project'
runs:
using: 'composite'
steps:
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache bun install
uses: actions/cache@v4
with:
path: |
~/.bun/install/cache
node_modules/.cache
key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
- run: bun install --frozen-lockfile
shell: bash
- run: bun run prebuild
shell: bash
- name: List generated files
shell: bash
run: |
echo "Listing .gen.ts and .gen.d.ts files:"
find . -name "*.gen.ts" -o -name "*.gen.d.ts"
- name: Save generated types
uses: actions/upload-artifact@v4
with:
name: generated-code
path: |
${{ github.workspace }}/packages/functions/.pikku
${{ github.workspace }}/packages/sdk/.generated
${{ github.workspace }}/packages/sdk/.pikku
${{ github.workspace }}/apps/website/pikku/*
${{ github.workspace }}/apps/website/public/locales
${{ github.workspace }}/apps/website/public/locales/*
include-hidden-files: true

26
.github/workflows/develop.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Develop
run-name: The develop workflow
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- develop
workflow_dispatch:
jobs:
setup:
name: Setup and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Run Tests
run: bun run test

52
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Main
run-name: The main release workflow
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
workflow_dispatch:
jobs:
setup:
name: Setup and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Run Tests
run: bun run test
website-build:
name: Build Website
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v4
# If your build generates code artifacts in prior jobs, keep this;
# otherwise you can remove it.
- name: Download generated files
uses: actions/download-artifact@v4
with:
name: generated-code
path: ${{ github.workspace }}
continue-on-error: true
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- run: bun install --frozen-lockfile
- name: Build NextJS Standalone App
run: bun run build:website