ci: add canary + prod workflows
This commit is contained in:
1 parent
be50457e80
commit
97c71f365f
3 files changed
+51
-5
No files matched your search
@@ -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,6 +1,5 @@
|
||||
name: ping-ssh
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
ping:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -8,10 +7,10 @@ jobs:
|
||||
- name: SSH ping
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
script: |
|
||||
whoami
|
||||
hostname
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user