Update build
Build Backend / build (push) Successful in 1m55s
Build Frontend / build (push) Failing after 2m48s

This commit is contained in:
2026-05-31 10:40:50 +02:00
parent f05be2a5bf
commit 5534a25ce5
2 changed files with 44 additions and 2 deletions
+22 -1
View File
@@ -1,4 +1,7 @@
name: Build Backend
env:
MAJOR: 1
MINOR: 0
defaults:
run:
@@ -36,10 +39,28 @@ jobs:
# Tells the action to use the local 'git' binary we just installed
set-safe-directory: 'true'
- name: Determine Version
run: |
LATEST_TAG=$(git tag -l "v${{ env.MAJOR }}.${{ env.MINOR }}.*" | sort -V | tail -n 1)
if [ -z "$LATEST_TAG" ]; then
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.0"
else
# Strip the 'v' if present and get the patch version
PATCH=$(echo "$LATEST_TAG" | sed 's/v//' | cut -d'.' -f3)
NEW_PATCH=$((PATCH + 1))
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.$NEW_PATCH"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-t gitea.lan/jacobh2/babymonitor:backend-latest \
-t gitea.lan/jacobh2/babymonitor-backend:${{ env.VERSION }} \
./backend \
--push
- name: Tag and Push Version
run: |
git tag $VERSION
git push origin $VERSION
+22 -1
View File
@@ -1,4 +1,7 @@
name: Build Frontend
env:
MAJOR: 1
MINOR: 0
defaults:
run:
@@ -36,10 +39,28 @@ jobs:
# Tells the action to use the local 'git' binary we just installed
set-safe-directory: 'true'
- name: Determine Version
run: |
LATEST_TAG=$(git tag -l "v${{ env.MAJOR }}.${{ env.MINOR }}.*" | sort -V | tail -n 1)
if [ -z "$LATEST_TAG" ]; then
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.0"
else
# Strip the 'v' if present and get the patch version
PATCH=$(echo "$LATEST_TAG" | sed 's/v//' | cut -d'.' -f3)
NEW_PATCH=$((PATCH + 1))
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.$NEW_PATCH"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-t gitea.lan/jacobh2/babymonitor:frontend-latest \
-t gitea.lan/jacobh2/babymonitor-frontend:${{ env.VERSION }} \
./frontend \
--push
- name: Tag and Push Version
run: |
git tag $VERSION
git push origin $VERSION