ci: add specific_host input for multi-server deployment
This commit is contained in:
parent
d610095b71
commit
edd297f512
|
|
@ -18,12 +18,18 @@ on:
|
||||||
- preprod
|
- preprod
|
||||||
- prod
|
- prod
|
||||||
default: 'dev'
|
default: 'dev'
|
||||||
|
specific_host:
|
||||||
|
description: 'Specific Server IP (Optional)'
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ''
|
||||||
force_restart:
|
force_restart:
|
||||||
description: 'Force Service Restart'
|
description: 'Force Service Restart'
|
||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -83,7 +89,7 @@ jobs:
|
||||||
if: steps.context.outputs.ENV != ''
|
if: steps.context.outputs.ENV != ''
|
||||||
uses: appleboy/ssh-action@v1.0.0
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.HYDRA_HOST }}
|
host: ${{ inputs.specific_host != '' && inputs.specific_host || secrets.HYDRA_HOST }}
|
||||||
username: ${{ secrets.HYDRA_USER }}
|
username: ${{ secrets.HYDRA_USER }}
|
||||||
key: ${{ secrets.HYDRA_SSH_KEY }}
|
key: ${{ secrets.HYDRA_SSH_KEY }}
|
||||||
port: 22
|
port: 22
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue