Skip to content

Commit

Permalink
deploy: 설정된 환경변수 스프링 실행 때 삽입
Browse files Browse the repository at this point in the history
  • Loading branch information
GitJIHO committed Nov 6, 2024
1 parent 93eea4e commit 00ca420
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/testcode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,11 @@ jobs:
java-version: '21'
distribution: 'temurin'

- name: Set environment variables for database
run: |
echo "spring.datasource.url=${{ secrets.MYSQL_URL }}" >> $GITHUB_ENV
echo "spring.datasource.username=${{ secrets.MYSQL_USERNAME }}" >> $GITHUB_ENV
echo "spring.datasource.password=${{ secrets.MYSQL_PASSWORD }}" >> $GITHUB_ENV
echo "spring.jpa.hibernate.ddl-auto=create" >> $GITHUB_ENV
- name: Run Tests
env:
SPRING_DATASOURCE_URL: ${{ secrets.MYSQL_URL }}
SPRING_DATASOURCE_USERNAME: ${{ secrets.MYSQL_USERNAME }}
SPRING_DATASOURCE_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
SPRING_JPA_HIBERNATE_DDL_AUTO: "create"
JWT_SECRET: ${{ secrets.JWT_SECRET }}
run: ./gradlew test

0 comments on commit 00ca420

Please sign in to comment.