Skip to content

Commit

Permalink
Test actions commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SalkCoding committed Dec 8, 2024
1 parent 4314734 commit 1a09b27
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,17 @@ jobs:

- name: Docker image build and push
uses: docker/build-push-action@v2
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/backend:latest
build-args: |
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
- name: Set environment variables
run: |
echo "MYSQL_DATABASE=${{ secrets.DB_NAME }}" > .env
echo "MYSQL_ROOT_PASSWORD=${{ secrets.MYSQL_ROOT_PASSWORD }}" >> .env

- name: Deploy Application
uses: appleboy/[email protected]
Expand All @@ -48,6 +43,10 @@ jobs:
echo "### Change directory to Backend ###"
cd /home/***/Backend
echo "### Set environment variables ###"
export MYSQL_DATABASE=${{ secrets.DB_NAME }}
export MYSQL_ROOT_PASSWORD=${{ secrets.MYSQL_ROOT_PASSWORD }}
echo "### Pull origin main from github ###"
git pull origin actions
Expand Down

0 comments on commit 1a09b27

Please sign in to comment.