-
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
1c058f0
commit 670234e
Showing
1 changed file
with
20 additions
and
2 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 |
---|---|---|
|
@@ -22,14 +22,32 @@ jobs: | |
run: ./gradlew bootJar | ||
|
||
- name: Build Docker image | ||
run: docker build --platform linux/amd64 -t almaxgood/cardio-bot:1.0.0 . | ||
run: docker build --platform linux/amd64 -t almaxgood/cardio-bot:${{ vars.DOCKER_TAG }} . | ||
|
||
- name: Push Docker image | ||
run: docker push almaxgood/cardio-bot:1.0.0 | ||
run: docker push almaxgood/cardio-bot:${{ vars.DOCKER_TAG }} | ||
|
||
- name: Install sshpass | ||
run: sudo apt install sshpass | ||
|
||
- name: Compose .env file | ||
run: | | ||
echo POSTGRES_USER=${{ secrets.POSTGRES_USER }}>>.env | ||
echo POSTGRES_PASSWORD=${{ secrets.POSTGRES_PASSWORD }}>>.env | ||
echo MAIN_TOKEN=${{ secrets.MAIN_TOKEN }}>>.env | ||
echo LOGGER_TOKEN=${{ secrets.LOGGER_TOKEN }}>>.env | ||
echo GUIDE=${{ secrets.GUIDE }}>>.env | ||
echo DOCKER_TAG=${{ vars.DOCKER_TAG }}>>.env | ||
- name: Copy .env file to VM | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.VM_IP }} | ||
username: root | ||
password: ${{ secrets.VM_PASSWORD }} | ||
source: ./.env | ||
target: ~/cardio-bot | ||
|
||
- name: Run on VM | ||
run: sshpass -p ${{ secrets.VM_PASSWORD }} ssh -o StrictHostKeyChecking=no root@${{ secrets.VM_IP }} | ||
'cd ~/cardio-bot && | ||
|