Compare commits

3 Commits

Author SHA1 Message Date
julian cdcbbb0eda Trigger Komodo Stack redeploy on successful build
Build directus image / build-and-publish (push) Successful in 23s
2026-05-03 16:44:49 +00:00
julian 64f34e35f8 Trigger workflow on dev branch; tag images :dev (and :sha)
Build directus image / build-and-publish (push) Successful in 1m47s
2026-05-03 15:49:13 +00:00
julian 1149900ee3 Switch CI to new Gitea registry; drop Portainer trigger 2026-05-03 15:45:00 +00:00
2 changed files with 22 additions and 18 deletions
+21 -17
View File
@@ -2,7 +2,7 @@ name: Build directus image
on: on:
push: push:
branches: [main] branches: [dev]
paths: paths:
- 'snapshots/**' - 'snapshots/**'
- 'db-init/**' - 'db-init/**'
@@ -125,30 +125,34 @@ jobs:
- name: Login to Gitea registry - name: Login to Gitea registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.dev.microservices.al registry: git.dev.trmtracking.org
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
# Tag and push two tags: # Tag and push two tags:
# :main — mutable; always points at the latest commit on main. # :dev — mutable; always points at the latest commit on dev.
# :<sha> — immutable; pinned to this specific commit. # :<sha> — immutable; pinned to this specific commit.
# The deploy stack can reference either; :main for rolling updates, # The deploy stack can reference either; :dev for rolling updates,
# :<sha> for pinned deployments that need explicit rollback control. # :<sha> for pinned deployments that need explicit rollback control.
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
- name: Tag and push - name: Tag and push
run: | run: |
docker tag trm-directus:ci git.dev.microservices.al/trm/directus:main docker tag trm-directus:ci git.dev.trmtracking.org/trm/directus:dev
docker tag trm-directus:ci git.dev.microservices.al/trm/directus:${{ github.sha }} docker tag trm-directus:ci git.dev.trmtracking.org/trm/directus:${{ github.sha }}
docker push git.dev.microservices.al/trm/directus:main docker push git.dev.trmtracking.org/trm/directus:dev
docker push git.dev.microservices.al/trm/directus:${{ github.sha }} docker push git.dev.trmtracking.org/trm/directus:${{ github.sha }}
# ------------------------------------------------------------------------- - name: Trigger Komodo Stack redeploy
# Optional Portainer redeploy webhook. if: success()
# Fires only when PORTAINER_WEBHOOK_URL secret is configured in the repo. env:
# If the secret is absent the condition evaluates false and the step is URL: ${{ secrets.KOMODO_STACK_WEBHOOK_URL }}
# skipped — no error, no noise. SECRET: ${{ secrets.KOMODO_WEBHOOK_SECRET }}
# ------------------------------------------------------------------------- run: |
- name: Trigger Portainer redeploy (optional) body='{"ref":"refs/heads/dev"}'
if: ${{ secrets.PORTAINER_WEBHOOK_URL != '' }} sig=$(printf '%s' "$body" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')
run: curl -fsS -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}" curl -fsS -X POST \
-H 'Content-Type: application/json' \
-H "X-Hub-Signature-256: sha256=$sig" \
-d "$body" \
"$URL"
+1 -1
View File
@@ -6,7 +6,7 @@
# run `docker compose -f compose.dev.yaml up --build` and hit localhost:8055. # run `docker compose -f compose.dev.yaml up --build` and hit localhost:8055.
# #
# For STAGE and PRODUCTION deployment, use the multi-service compose in the # For STAGE and PRODUCTION deployment, use the multi-service compose in the
# sibling `deploy/` repo (https://git.dev.microservices.al/trm/deploy), which # sibling `deploy/` repo (https://git.dev.trmtracking.org/trm/deploy), which
# references this service by its registry image tag instead of building locally. # references this service by its registry image tag instead of building locally.
# #
# Usage: # Usage: