Skip to content

Commit 3fc33b4

Browse files
committed
feat: Allow specifying the Docker image version for deployment via workflow input.
1 parent a0c3d55 commit 3fc33b4

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Deploy
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Image tag to deploy (e.g. v0.70.1 or sha-abcdef)'
8+
required: true
9+
default: 'latest'
510

611
jobs:
712
deploy:
@@ -83,7 +88,7 @@ jobs:
8388
--region "${AWS_REGION}" \
8489
--instance-ids "${SSM_TARGET}" \
8590
--document-name "AWS-RunShellScript" \
86-
--parameters 'commands=["sudo su ubuntu -c \"cd ~/docmost && sudo docker compose pull && sudo docker compose up -d\""]' \
91+
--parameters "commands=[\"cd ~/docmost && sudo IMAGE_TAG=${{ github.event.inputs.version }} docker compose pull && sudo IMAGE_TAG=${{ github.event.inputs.version }} docker compose up -d\"]" \
8792
--output text \
8893
--query "Command.CommandId")
8994

docker-compose.production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
docmost:
3-
image: ghcr.io/chipasia/docmost-source:latest
3+
image: ghcr.io/chipasia/docmost-source:${IMAGE_TAG:-latest}
44
container_name: docmost-app
55
restart: unless-stopped
66
ports:

0 commit comments

Comments
 (0)