Skip to content

Commit

Permalink
docs: 환경변수 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
somin-jeong committed Apr 29, 2024
1 parent ff6301a commit 95e1756
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
contents: read

steps:
- uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -35,7 +37,6 @@ jobs:

- name: Build with Gradle Wrapper
run: ./gradlew build

env:
ACTIVE_PROFILE: ${{ secrets.ACTIVE_PROFILE }}

Expand All @@ -61,11 +62,32 @@ jobs:

USER_DAFAULTIMAGE: ${{ secrets.USER_DAFAULTIMAGE }}

docker-build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Grant execute permisson for gradlew
run: chmod +x gradlew

- name: Build with Gradle (without Test)
run: ./gradlew clean build -x test --stacktrace

- name: Docker build
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t app .
sudo docker build --build-arg ACTIVE_PROFILE=${{ secrets.ACTIVE_PROFILE }} \
docker build --build-arg ACTIVE_PROFILE=${{ secrets.ACTIVE_PROFILE }} \
--build-arg DATASOURCE_URL_DEV=${{ secrets.DATASOURCE_URL_DEV }} \
--build-arg DATASOURCE_USERNAME=${{ secrets.DATASOURCE_USERNAME }} \
--build-arg DATASOURCE_PASSWORD=${{ secrets.DATASOURCE_PASSWORD }} \
Expand Down

0 comments on commit 95e1756

Please sign in to comment.