Skip to content

Commit

Permalink
Actually use bastion_ip input variable
Browse files Browse the repository at this point in the history
  • Loading branch information
violine1101 authored Sep 4, 2024
1 parent 79def58 commit bb20572
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,24 @@ runs:
echo Uploading artifacts...
while IFS= read -r ARTIFACT_PATH; do
echo Uploading artifact $ARTIFACT_PATH...
rsync -avh --delete -e "ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p $BASTION_PORT" $GITHUB_WORKSPACE/$ARTIFACT_PATH $USERNAME@localhost:$ARTIFACT_DESTINATION
rsync -avh --delete -e "ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p $BASTION_PORT" $GITHUB_WORKSPACE/$ARTIFACT_PATH $USERNAME@$BASTION_IP:$ARTIFACT_DESTINATION
done < <(printf '%s' "$ARTIFACT_PATHS")
shell: bash
env:
BASTION_IP: ${{ inputs.bastion_ip }}
BASTION_PORT: ${{ inputs.bastion_port }}
USERNAME: ${{ inputs.username }}
ARTIFACT_PATHS: ${{ inputs.artifact_paths }}
ARTIFACT_DESTINATION: ${{ inputs.artifact_destination }}
- name: Run deploy script
run: |
echo Running internal deploy script...
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p $BASTION_PORT $USERNAME@localhost <<EOF
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p $BASTION_PORT $USERNAME@$BASTION_IP <<EOF
$SCRIPT
EOF
shell: bash
env:
BASTION_IP: ${{ inputs.bastion_ip }}
BASTION_PORT: ${{ inputs.bastion_port }}
USERNAME: ${{ inputs.username }}
SCRIPT: ${{ inputs.script }}
Expand Down

0 comments on commit bb20572

Please sign in to comment.