-
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
alserious
committed
Oct 12, 2023
1 parent
0a7e614
commit be11e0b
Showing
1 changed file
with
10 additions
and
6 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
|
||
env: | ||
image_name: TelegramGPTBot:$(date +%s) | ||
image_path: /home/runner/work/TelegramGPTBot/TelegramGPTBot/TelegramGPTBot_image.tar | ||
image_path: /home/runner/work/TelegramGPTBot/TelegramGPTBot/telegram_gpt_bot_image.tar | ||
prod_image_folder_path: /root/projects/TelegramGPTBot | ||
|
||
jobs: | ||
|
@@ -17,9 +17,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: ls -l | ||
- name: Check ls -l before build | ||
run: | | ||
ls -l | ||
ls -l -h | ||
- name: Build the Docker image | ||
run: | | ||
|
@@ -29,21 +29,25 @@ jobs: | |
run: | | ||
docker save -o telegram_gpt_bot_image.tar telegram_gpt_bot_image:latest | ||
- name: ls -l | ||
- name: Check ls -l after docker build | ||
run: | | ||
ls -l | ||
ls -l -h | ||
- name: Copy tar file to prod server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
port: ${{ secrets.PORT }} | ||
key: ${{ secrets.KEY }} | ||
# source: "tests/a.txt,tests/b.txt" | ||
source: "$image_path" | ||
target: $prod_image_folder_path | ||
|
||
- name: Load the Docker image from tar file | ||
run: | | ||
docker load --input telegram_gpt_bot_image.tar | ||
# - name: Copy tar file to prod server | ||
# run: | | ||
# # docker save -o $image_path $image_name | ||
|