Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cdcbbb0eda | |||
| 64f34e35f8 | |||
| 1149900ee3 |
+21
-17
@@ -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
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user