2 Commits

Author SHA1 Message Date
ea101d1695 Merge branch 'main' of https://git.allucanget.biz/allucanget/calminer
Some checks failed
CI / lint (push) Successful in 17s
Deploy - Coolify / deploy (push) Failing after 5s
CI / test (push) Successful in 1m3s
CI / build (push) Successful in 2m15s
2025-11-14 21:22:37 +01:00
722f93b41c refactor(ci): remove deployment context capture and simplify API call for Coolify deployment 2025-11-14 21:20:37 +01:00
2 changed files with 9 additions and 29 deletions

View File

@@ -20,31 +20,6 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Capture deployment context
id: context
run: |
set -euo pipefail
repo="${GITEA_REPOSITORY:-${GITHUB_REPOSITORY:-}}"
if [ -z "$repo" ]; then
repo="$(git remote get-url origin | sed 's#.*/\(.*\)\.git#\1#')"
fi
ref_name="${GITEA_REF_NAME:-${GITHUB_REF_NAME:-}}"
full_ref="${GITEA_REF:-${GITHUB_REF:-}}"
if [ -z "$ref_name" ] && [ -n "$full_ref" ]; then
ref_name="${full_ref##*/}"
fi
if [ -z "$ref_name" ]; then
ref_name="$(git rev-parse --abbrev-ref HEAD)"
fi
sha="${GITEA_SHA:-${GITHUB_SHA:-}}"
if [ -z "$sha" ]; then
sha="$(git rev-parse HEAD)"
fi
echo "repository=$repo" >> "$GITHUB_OUTPUT"
echo "ref=${ref_name:-main}" >> "$GITHUB_OUTPUT"
echo "sha=$sha" >> "$GITHUB_OUTPUT"
- name: Prepare compose bundle - name: Prepare compose bundle
run: | run: |
set -euo pipefail set -euo pipefail
@@ -72,12 +47,10 @@ jobs:
fi fi
- name: Trigger deployment via Coolify API - name: Trigger deployment via Coolify API
env:
HEAD_SHA: ${{ steps.context.outputs.sha }}
run: | run: |
set -euo pipefail set -euo pipefail
api_url="$COOLIFY_BASE_URL/api/v1/applications/${COOLIFY_APPLICATION_ID}/deploy" api_url="$COOLIFY_BASE_URL/api/v1/deploy"
payload=$(jq -n --arg sha "$HEAD_SHA" '{ commitSha: $sha }') payload=$(jq -n --arg uuid "$COOLIFY_APPLICATION_ID" '{ uuid: $uuid }')
response=$(curl -sS -w '\n%{http_code}' \ response=$(curl -sS -w '\n%{http_code}' \
-X POST "$api_url" \ -X POST "$api_url" \
-H "Authorization: Bearer $COOLIFY_API_TOKEN" \ -H "Authorization: Bearer $COOLIFY_API_TOKEN" \

View File

@@ -1,5 +1,12 @@
# Changelog # Changelog
## 2025-11-14
- Finalised Coolify automation by stabilising `.gitea/workflows/deploy-coolify.yml` on a `push` trigger to `main`, calculating branch/commit context via Gitea-first environment variables, and bundling compose/env artifacts for traceability.
- Hardened the build workflow so registry authentication normalises the `git.allucanget.biz` host, loads tagged images locally, and pushes both `latest` and commit SHA tags before deployment, with deploy/k8s jobs reusing the resolved repository path.
- Updated `docker-compose.prod.yml` and Coolify documentation so production pulls `git.allucanget.biz/allucanget/calminer:latest`, added secret/registry guidance plus runner DNS notes to `calminer-docs/CONTRIBUTING.md`, and recorded the completion in `.github/instructions/DONE.md`.
- Introduced the `K8S_DEPLOY_ENABLED` toggle so CI can default to skipping Kubernetes rollouts unless explicitly enabled, guarded all kubectl steps behind the flag, surfaced a notice when disabled, and documented the secret for operators.
## 2025-11-13 ## 2025-11-13
- Completed the UI alignment initiative by consolidating shared form and button styles into `static/css/forms.css` and `static/css/main.css`, introducing the semantic palette in `static/css/theme-default.css`, and spot-checking key pages plus contrast reports. - Completed the UI alignment initiative by consolidating shared form and button styles into `static/css/forms.css` and `static/css/main.css`, introducing the semantic palette in `static/css/theme-default.css`, and spot-checking key pages plus contrast reports.