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