This commit is contained in:
2026-02-06 17:26:40 +07:00
parent edccc9cfbd
commit 782d0d403a
2 changed files with 74 additions and 13 deletions

View File

@@ -0,0 +1,36 @@
name: Deploy Template
on:
workflow_call:
inputs:
runner:
required: true
type: string
image:
required: true
type: string
jobs:
deploy:
runs-on: ${{ inputs.runner }}
steps:
- name: Show target server
run: echo "Deploying on ${{ inputs.runner }}"
# Force compose to use the exact image tag we built/pushed, regardless of
# what the server's compose file has hard-coded.
- name: Compose Up (Linux)
if: runner.os != 'Windows'
env:
DOCKER_IMAGE: ${{ inputs.image }}
run: |
docker compose up -d --pull always --remove-orphans
- name: Compose Up (Windows)
if: runner.os == 'Windows'
env:
DOCKER_IMAGE: ${{ inputs.image }}
run: |
docker compose up -d --pull always --remove-orphans