ci: add canary + prod workflows

This commit is contained in:
moham committed 2025-09-18 00:09:15 +02:00
1 parent be50457e80
commit 97c71f365f
3 files changed
+47 -1

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
name: deploy-canary
on:
push:
branches: [ main ]
workflow_dispatch: {}
concurrency:
group: deploy-canary
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to CANARY
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -euo pipefail
cd /srv/ihm/app/IHMKOS
git fetch --all
git reset --hard origin/main
/srv/ihm/scripts/docker-run-canary.sh
-1
View File
@@ -1,6 +1,5 @@
name: ping-ssh name: ping-ssh
on: [push] on: [push]
jobs: jobs:
ping: ping:
runs-on: ubuntu-latest runs-on: ubuntu-latest
+21
View File
@@ -0,0 +1,21 @@
name: promote-to-prod
on:
workflow_dispatch: {}
concurrency:
group: promote-prod
cancel-in-progress: true
jobs:
promote:
runs-on: ubuntu-latest
steps:
- name: Promote to PROD
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -euo pipefail
export IHM_DRY_RUN=0
/srv/ihm/scripts/docker-run.sh