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 1a09b27 commit ee28263
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ jobs:
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: echo "${{ secrets.APPLICATION }}" > ./src/main/resources/application.yml

- name: Gradle Caching
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -21,12 +32,6 @@ 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
Expand All @@ -43,10 +48,6 @@ 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/
/src/main/resources/application.yml

### STS ###
.apt_generated
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ spring:
name: OhLottery

datasource:
url: jdbc:mysql://${DB_HOST}:${DB_PORT}/${DB_NAME}
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
url: jdbc:mysql://localhost:3306/ohlottery
username: root
password: salk1104-
driver-class-name: com.mysql.cj.jdbc.Driver

jpa:
Expand Down

0 comments on commit ee28263

Please sign in to comment.