File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change 55 description : " The private SSH key used to authenticate with the remote servers"
66 required : true
77
8- public_bastion_host_keys :
9- description : " The public SSH host keys for the bastion server"
10- required : true
11-
128 bastion_host :
139 description : " The [user@]hostname of the bastion server"
1410 required : true
3329 using : " composite"
3430 steps :
3531 - name : Configure ssh-agent for subsequent steps
36- run : echo "SSH_AUTH_SOCK=/tmp /ssh_agent.sock" >> $GITHUB_ENV
32+ run : echo "SSH_AUTH_SOCK=${{ runner.temp }} /ssh_agent.sock" >> $GITHUB_ENV
3733 shell : bash
3834
3935 - name : Start ssh-agent with SSH key
4238 ssh-add - <<< "${{ inputs.private_ssh_key }}"
4339 shell : bash
4440
45- - name : Populate known hosts
46- run : |
47- mkdir -m 700 -p ~/.ssh
48- printf "${{ inputs.public_bastion_host_keys }}" >> ~/.ssh/known_hosts
49- chmod 600 ~/.ssh/known_hosts
50- shell : bash
51-
5241 - name : Deploy to primary server
5342 run : rsync -avz --delete -e 'ssh -A ${{ inputs.bastion_host }} ssh' ${{ inputs.source }} ${{ inputs.primary_host }}:${{ inputs.destination }}
5443 shell : bash
Original file line number Diff line number Diff line change 5757 uses : ./.github/actions/deploy-action
5858 with :
5959 private_ssh_key : ${{ secrets.DEPLOY_SSH_KEY }}
60- public_bastion_host_keys : ${{ secrets.DEPLOY_KNOWN_HOSTS }}
6160 bastion_host : ${{ secrets.DEPLOY_BASTION_HOST }}
6261 primary_host : ${{ secrets.DEPLOY_PRIMARY_HOST }}
6362 secondary_host : ${{ secrets.DEPLOY_SECONDARY_HOST }}
You can’t perform that action at this time.
0 commit comments