-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1dac168
commit 5991f68
Showing
2 changed files
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,15 +24,20 @@ jobs: | |
run: | | ||
docker save my-backend:latest -o my-backend.tar | ||
- name: Add SSH key | ||
run: | | ||
echo "${{ secrets.VM_SSH_KEY }}" > /tmp/vm_ssh_key | ||
chmod 600 /tmp/vm_ssh_key | ||
- name: Copy Docker image to VM | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.VM_HOST }} | ||
username: ${{ secrets.VM_USERNAME }} | ||
key: ${{ secrets.VM_SSH_KEY }} | ||
key: /tmp/vm_ssh_key | ||
source: "my-backend.tar" | ||
target: "/home/azureuser/docker-images/my-backend.tar" | ||
|
||
- name: Load Docker image on VM | ||
run: | | ||
ssh -i ${{ secrets.VM_SSH_KEY }} ${{ secrets.VM_USERNAME }}@${{ secrets.VM_HOST }} 'docker load -i /home/azureuser/docker-images/my-backend.tar' | ||
ssh -i /tmp/vm_ssh_key ${{ secrets.VM_USERNAME }}@${{ secrets.VM_HOST }} 'docker load -i /home/azureuser/docker-images/my-backend.tar' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
print("Hello-world") | ||
print("___") | ||
print("") | ||
print("H") | ||
print("HH") |