Compare commits

..

5 Commits

Author SHA1 Message Date
396b6d210b Merge pull request 'Add version, hash, and environment as build variables' (#4) from staging-build into main
All checks were successful
Build and Test - Production / determine_version (push) Successful in 5s
Build and Test - Production / build_and_push (push) Successful in 42s
Build and Test - Production / test (push) Successful in 2s
Build and Test - Production / deploy_production (push) Successful in 3s
Reviewed-on: #4
2025-07-09 10:14:03 +00:00
594bc9bc4f No sleep, just need to call start and not stop...
All checks were successful
Build and Test - Staging / determine_version (pull_request) Successful in 6s
Build and Test - Staging / build_and_push (pull_request) Successful in 42s
Build and Test - Staging / test (pull_request) Successful in 1s
Build and Test - Staging / deploy_staging (pull_request) Successful in 2s
2025-07-09 03:12:21 -07:00
e4a87c3941 Deployment needs sleep after stopping
All checks were successful
Build and Test - Staging / build_and_push (pull_request) Successful in 41s
Build and Test - Staging / test (pull_request) Successful in 2s
Build and Test - Staging / determine_version (pull_request) Successful in 5s
Build and Test - Staging / deploy_staging (pull_request) Successful in 7s
2025-07-09 03:09:49 -07:00
3ba6db7f83 Make variables public
All checks were successful
Build and Test - Staging / determine_version (pull_request) Successful in 6s
Build and Test - Staging / build_and_push (pull_request) Successful in 40s
Build and Test - Staging / test (pull_request) Successful in 2s
Build and Test - Staging / deploy_staging (pull_request) Successful in 3s
2025-07-09 03:06:30 -07:00
b37ee3f94c Add version, hash, and environment as build variables 2025-07-09 03:04:22 -07:00
3 changed files with 18 additions and 2 deletions

View File

@@ -52,6 +52,10 @@ jobs:
gitea.perren.cloud/caperren/${{ needs.determine_version.outputs.repo_name }}:${{ needs.determine_version.outputs.repo_version_hash }}
gitea.perren.cloud/caperren/${{ needs.determine_version.outputs.repo_name }}:${{ needs.determine_version.outputs.project_version }}
gitea.perren.cloud/caperren/caperren-com:latest
build-args: |
REPO_VERSION_HASH=${{ needs.determine_version.outputs.repo_version_hash }}
PROJECT_VERSION=${{ needs.determine_version.outputs.project_version }}
BUILD_ENVIRONMENT=production
test:
runs-on: ubuntu-latest
@@ -85,7 +89,7 @@ jobs:
- name: Start App
run: |
curl -k -X 'POST' \
'https://caperren.com:444/api/v2.0/app/stop' \
'https://caperren.com:444/api/v2.0/app/start' \
-H 'accept: */*' \
-H 'Authorization: Bearer ${{ secrets.TRUENAS_CAPERRENCOM_API_KEY }}' \
-H 'Content-Type: application/json' \

View File

@@ -50,6 +50,10 @@ jobs:
push: true
tags: |
gitea.perren.cloud/caperren/caperren-com:latest-staging
build-args: |
REPO_VERSION_HASH=${{ needs.determine_version.outputs.repo_version_hash }}
PROJECT_VERSION=${{ needs.determine_version.outputs.project_version }}
BUILD_ENVIRONMENT=staging
test:
runs-on: ubuntu-latest
@@ -72,6 +76,7 @@ jobs:
"name": "caperren-com-stg",
"options": {}
}'
- name: Stop App
run: |
curl -k -X 'POST' \
@@ -83,7 +88,7 @@ jobs:
- name: Start App
run: |
curl -k -X 'POST' \
'https://caperren.com:444/api/v2.0/app/stop' \
'https://caperren.com:444/api/v2.0/app/start' \
-H 'accept: */*' \
-H 'Authorization: Bearer ${{ secrets.TRUENAS_CAPERRENCOM_API_KEY }}' \
-H 'Content-Type: application/json' \

View File

@@ -12,7 +12,14 @@ FROM base AS build-deps
RUN npm install
FROM build-deps AS build
COPY . .
ARG REPO_VERSION_HASH
ARG PROJECT_VERSION
RUN echo $"PUBLIC_REPO_VERSION_HASH=${REPO_VERSION_HASH} \n\
PUBLIC_PROJECT_VERSION=${PROJECT_VERSION}" >> .env
RUN npm run build
FROM httpd:latest AS runtime