Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cdcbbb0eda | |||
| 64f34e35f8 | |||
| 1149900ee3 |
+21
-17
@@ -2,7 +2,7 @@ name: Build directus image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
branches: [dev]
|
||||
paths:
|
||||
- 'snapshots/**'
|
||||
- 'db-init/**'
|
||||
@@ -125,30 +125,34 @@ jobs:
|
||||
- name: Login to Gitea registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.dev.microservices.al
|
||||
registry: git.dev.trmtracking.org
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 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.
|
||||
# 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.
|
||||
# -------------------------------------------------------------------------
|
||||
- name: Tag and push
|
||||
run: |
|
||||
docker tag trm-directus:ci git.dev.microservices.al/trm/directus:main
|
||||
docker tag trm-directus:ci git.dev.microservices.al/trm/directus:${{ github.sha }}
|
||||
docker push git.dev.microservices.al/trm/directus:main
|
||||
docker push git.dev.microservices.al/trm/directus:${{ github.sha }}
|
||||
docker tag trm-directus:ci git.dev.trmtracking.org/trm/directus:dev
|
||||
docker tag trm-directus:ci git.dev.trmtracking.org/trm/directus:${{ github.sha }}
|
||||
docker push git.dev.trmtracking.org/trm/directus:dev
|
||||
docker push git.dev.trmtracking.org/trm/directus:${{ github.sha }}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# Optional Portainer redeploy webhook.
|
||||
# Fires only when PORTAINER_WEBHOOK_URL secret is configured in the repo.
|
||||
# If the secret is absent the condition evaluates false and the step is
|
||||
# skipped — no error, no noise.
|
||||
# -------------------------------------------------------------------------
|
||||
- name: Trigger Portainer redeploy (optional)
|
||||
if: ${{ secrets.PORTAINER_WEBHOOK_URL != '' }}
|
||||
run: curl -fsS -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"
|
||||
- name: Trigger Komodo Stack redeploy
|
||||
if: success()
|
||||
env:
|
||||
URL: ${{ secrets.KOMODO_STACK_WEBHOOK_URL }}
|
||||
SECRET: ${{ secrets.KOMODO_WEBHOOK_SECRET }}
|
||||
run: |
|
||||
body='{"ref":"refs/heads/dev"}'
|
||||
sig=$(printf '%s' "$body" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')
|
||||
curl -fsS -X POST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "X-Hub-Signature-256: sha256=$sig" \
|
||||
-d "$body" \
|
||||
"$URL"
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
# Usage:
|
||||
|
||||
Reference in New Issue
Block a user