-
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
2310647
commit b2bfda1
Showing
1 changed file
with
31 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -82,6 +82,36 @@ jobs: | |
needs: push_to_dockerhub | ||
|
||
steps: | ||
- name: Get docker form dockerhub via SSH action | ||
uses: appleboy/[email protected] | ||
with: | ||
debug: true | ||
host: ${{ secrets.DEPLOY_HOST }} | ||
port: ${{ secrets.DEPLOY_PORT }} | ||
username: ${{ secrets.DEPLOY_USERNAME }} | ||
key: ${{ secrets.SSHKEY }} | ||
envs: REGISTRY, IMAGE_NAME, CONTAINER_NAME, GITHUB_SHA, FOLDER_COMPOSE | ||
script: | | ||
sudo bash | ||
cd $(echo $FOLDER_COMPOSE) | ||
cat <<EOF>.env | ||
DB_NAME=${{ secrets.DB_NAME }} | ||
DB_USER=${{ secrets.POSTGRES_USER }} | ||
DB_PASSWORD=${{ secrets.POSTGRES_PASSWORD }} | ||
DB_HOST=${{ secrets.DB_HOST }} | ||
DB_PORT=${{ secrets.DB_PORT }} | ||
SECRET=${{ secrets.SECRET }} | ||
IMAGE_NAME=${{ env.IMAGE_NAME }} | ||
REGISTRY=${{ env.REGISTRY }} | ||
CONTAINER_NAME=${{ env.CONTAINER_NAME }} | ||
EOF | ||
- name: Deploy docker-compose via SSH action | ||
uses: appleboy/[email protected] | ||
with: | ||
|
@@ -91,7 +121,7 @@ jobs: | |
username: ${{ secrets.DEPLOY_USERNAME }} | ||
key: ${{ secrets.SSHKEY }} | ||
rm: true | ||
source: docker-compose.yml, cmd/api/init/db/postgresql/schema/initdb.sql # ????? | ||
source: "docker-compose.yml, cmd/api/init/db/postgresql/schema/initdb.sql" | ||
target: ~/${{ env.FOLDER_COMPOSE }} | ||
|
||
- name: Get docker form dockerhub via SSH action | ||
|