feat: single-container deployment & automated semantic versioning; add release workflow, version injection, health endpoint metadata, documentation

This commit is contained in:
Wikid82
2025-11-17 19:29:25 -05:00
parent b17e7d3d5f
commit 5dd5036661
19 changed files with 667 additions and 97 deletions
+4 -2
View File
@@ -11,6 +11,7 @@ on:
branches:
- main
- development
workflow_call: # Allow this workflow to be called by other workflows
env:
REGISTRY: ghcr.io
@@ -56,6 +57,7 @@ jobs:
type=sha,prefix={{branch}}-
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
@@ -66,9 +68,9 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILD_DATE=${{ github.event.head_commit.timestamp }}
VCS_REF=${{ github.sha }}
VERSION=${{ steps.meta.outputs.version }}
BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
VCS_REF=${{ github.sha }}
- name: Image digest
run: echo ${{ steps.build-and-push.outputs.digest }}
+52
View File
@@ -0,0 +1,52 @@
name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
packages: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate changelog
id: changelog
run: |
# Get previous tag
PREV_TAG=$(git describe --tags --abbrev=0 $(git rev-list --tags --skip=1 --max-count=1) 2>/dev/null || echo "")
if [ -z "$PREV_TAG" ]; then
echo "First release - generating full changelog"
CHANGELOG=$(git log --pretty=format:"- %s (%h)" --no-merges)
else
echo "Generating changelog since $PREV_TAG"
CHANGELOG=$(git log $PREV_TAG..HEAD --pretty=format:"- %s (%h)" --no-merges)
fi
# Save to file for GitHub release
echo "$CHANGELOG" > CHANGELOG.txt
echo "Generated changelog with $(echo "$CHANGELOG" | wc -l) commits"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.txt
generate_release_notes: true
draft: false
prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-and-publish:
needs: create-release
uses: ./.github/workflows/docker-publish.yml
secrets: inherit