mirror of
https://github.com/kikootwo/ReadMeABook.git
synced 2026-06-02 20:30:10 +00:00
Add volume mapping docs and build/version metadata
Add a volume-mapping guide and surface build/version metadata throughout the project. Changes included: - documentation: Add documentation/deployment/volume-mapping.md and update TABLEOFCONTENTS.md and README to reference it (helps users align download client and RMAB paths). - CI: Capture package.json version in .github/workflows/build-unified-image.yml, pass APP_VERSION as a build-arg, and update the Discord notification to show the semantic version and pull `:latest`. - Docker: Declare ARG APP_VERSION and expose NEXT_PUBLIC_APP_VERSION / APP_VERSION / GIT_COMMIT env vars in dockerfile.unified so runtime and client can read the semantic version and commit. - App API/UI: Update src/app/api/version/route.ts and src/components/ui/VersionBadge.tsx to prefer semantic app version (APP_VERSION / NEXT_PUBLIC_APP_VERSION), include fullVersion and commit info, show commit in tooltip, and adjust fallback/dev labels. - Tests: Update tests (system.routes.test.ts and VersionBadge.test.tsx) to reflect the new version/commit fields and behavior. - Audible integration: Add ipRedirectOverride query param to multiple Audible requests to avoid IP-based region redirects. - Misc: Bump package.json version to 1.0.0. These changes make version information consistent between build, runtime, and UI, improve CI notifications, add user guidance for common volume-mapping issues, and harden Audible scraping against region redirects.
This commit is contained in:
@@ -2,8 +2,6 @@ name: Build and Publish Unified Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
@@ -62,6 +60,7 @@ jobs:
|
||||
- name: Capture version information
|
||||
id: version
|
||||
run: |
|
||||
echo "app_version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
|
||||
echo "git_commit=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
|
||||
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_OUTPUT
|
||||
|
||||
@@ -77,6 +76,7 @@ jobs:
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
build-args: |
|
||||
APP_VERSION=${{ steps.version.outputs.app_version }}
|
||||
GIT_COMMIT=${{ steps.version.outputs.git_commit }}
|
||||
BUILD_DATE=${{ steps.version.outputs.build_date }}
|
||||
|
||||
@@ -110,12 +110,12 @@ jobs:
|
||||
-d '{
|
||||
"embeds": [{
|
||||
"title": "📦 Docker Image Published",
|
||||
"description": "A new version of **ReadMeABook** has been built and published to GitHub Container Registry.",
|
||||
"description": "**ReadMeABook v${{ steps.version.outputs.app_version }}** has been built and published to GitHub Container Registry.",
|
||||
"color": 5763719,
|
||||
"fields": [
|
||||
{
|
||||
"name": "🏷️ Image Tag",
|
||||
"value": "`sha-${{ steps.version.outputs.git_commit }}`",
|
||||
"name": "🔖 Version",
|
||||
"value": "`v${{ steps.version.outputs.app_version }}`",
|
||||
"inline": true
|
||||
},
|
||||
{
|
||||
@@ -130,12 +130,12 @@ jobs:
|
||||
},
|
||||
{
|
||||
"name": "📥 Pull Command",
|
||||
"value": "```docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:sha-${{ steps.version.outputs.git_commit }}```",
|
||||
"value": "```docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest```",
|
||||
"inline": false
|
||||
}
|
||||
],
|
||||
"footer": {
|
||||
"text": "ReadMeABook CI/CD • Built with GitHub Actions"
|
||||
"text": "ReadMeABook v${{ steps.version.outputs.app_version }} • Built with GitHub Actions"
|
||||
},
|
||||
"timestamp": "${{ steps.version.outputs.build_date }}"
|
||||
}]
|
||||
|
||||
Reference in New Issue
Block a user