ci: update source path
Push -> develop / Build Docker images (push) Successful in 2m52s
Push -> develop / Deploy (push) Successful in 7s
Push -> develop / Notify on result (push) Successful in 0s

This commit is contained in:
sangnn
2026-06-23 02:44:17 +00:00
parent 8d2ce300a0
commit f58ec37b8a
5 changed files with 52 additions and 7 deletions
+4 -3
View File
@@ -51,7 +51,7 @@ jobs:
# ── 2. Deploy ─────────────────────────────────────────────────────────────────
deploy:
name: Rolling deploy
name: Deploy
runs-on: stage-gatehouse-api
needs: build
env:
@@ -60,10 +60,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Deploy (rolling restart)
- name: Deploy (docker compose up)
run: |
cp docker-compose.yml "${COMPOSE_DIR}/docker-compose.yml"
bash deploy/deploy.sh "${{ needs.build.outputs.tag }}"
cd "${COMPOSE_DIR}"
IMAGE_TAG="${{ needs.build.outputs.tag }}" docker compose up -d --remove-orphans
# ── 3. Alert ──────────────────────────────────────────────────────────────────
alert:
+4 -3
View File
@@ -50,7 +50,7 @@ jobs:
# ── 2. Deploy ─────────────────────────────────────────────────────────────────
deploy:
name: Rolling deploy
name: Deploy
runs-on: prod-gatehouse-api
needs: build
env:
@@ -59,10 +59,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Deploy (rolling restart)
- name: Deploy (docker compose up)
run: |
cp docker-compose.yml "${COMPOSE_DIR}/docker-compose.yml"
bash deploy/deploy.sh "${{ needs.build.outputs.tag }}"
cd "${COMPOSE_DIR}"
IMAGE_TAG="${{ needs.build.outputs.tag }}" docker compose up -d --remove-orphans
# ── 3. Alert ──────────────────────────────────────────────────────────────────
alert:
+6
View File
@@ -29,6 +29,12 @@ node_major_version: "26"
trivy_version: "0.71.2"
gitleaks_version: "8.30.1"
# Docker CLI plugins. The engine ships without them, so `docker compose` (used by
# deploy.sh) and `docker buildx` are missing — deploy.sh then fails with exit 125.
# Installed as pinned binaries into the host cli-plugins dir; bump to upgrade.
docker_compose_version: "5.1.4"
docker_buildx_version: "0.35.0"
# Registration tokens come from env vars named by each project's `token_env`
# (e.g. RUNNER_TOKEN_GATEHOUSE_API). Export them on the control node before running.
# Mint from: Gitea repo → Settings → Actions → Runners → Create new runner token.
+1 -1
View File
@@ -14,6 +14,6 @@ runners:
- project: gatehouse-ui
url: https://source.hawkless.id.au/coryHawkvelt/gatehouse-ui
labels: "self-hosted:host,linux:host,stage:host"
labels: "self-hosted:host,linux:host,stage:host,stage-gatehouse-ui:host"
token_env: RUNNER_TOKEN_GATEHOUSE_UI
count: 1
+37
View File
@@ -84,6 +84,43 @@
mode: "0755"
when: gitleaks_version not in (gitleaks_check.stdout | default(''))
# The Docker engine ships without CLI plugins, so `docker compose` (used by
# deploy.sh) and `docker buildx` are absent. Install them host-wide; this
# path is searched by both docker.io and docker-ce CLIs.
- name: Ensure Docker CLI plugins dir exists
ansible.builtin.file:
path: /usr/libexec/docker/cli-plugins
state: directory
mode: "0755"
- name: Check installed Docker Compose plugin version
ansible.builtin.command: docker compose version --short
register: compose_check
changed_when: false
failed_when: false
- name: Install Docker Compose v2 plugin {{ docker_compose_version }}
ansible.builtin.get_url:
url: "https://github.com/docker/compose/releases/download/v{{ docker_compose_version }}/docker-compose-linux-x86_64"
dest: /usr/libexec/docker/cli-plugins/docker-compose
mode: "0755"
force: true
when: docker_compose_version not in (compose_check.stdout | default(''))
- name: Check installed Docker Buildx plugin version
ansible.builtin.command: docker buildx version
register: buildx_check
changed_when: false
failed_when: false
- name: Install Docker Buildx plugin {{ docker_buildx_version }}
ansible.builtin.get_url:
url: "https://github.com/docker/buildx/releases/download/v{{ docker_buildx_version }}/buildx-v{{ docker_buildx_version }}.linux-amd64"
dest: /usr/libexec/docker/cli-plugins/docker-buildx
mode: "0755"
force: true
when: docker_buildx_version not in (buildx_check.stdout | default(''))
# Deploy target for each project's compose stack. Owned by the runner so the
# deploy job can `cp docker-compose.yml` here; the host-managed .env lives
# here too. Basename matches the compose project name, preserving volumes.