Skip to content

Commit

Permalink
test: #13 서브모듈 코드 재수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kyxxgsoo authored Jul 16, 2024
1 parent c1bcac3 commit e418c12
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GIT_ACCESS_TOKEN }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Build with Gradle Wrapper
run: ./gradlew build
run: |
echo ${{ secrets.APPLICATION_SECRET }} | base64 --decode > ./config/application-secret.yml
cat ./config/application-secret.yml
./gradlew build -x test
- name: Login to DockerHub
uses: docker/login-action@v1
Expand All @@ -30,7 +36,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build Docker
run: docker build --platform linux/amd64 -t ${{ secrets.DOCKERHUB_USERNAME }}/plat_server .
run: docker build --platform linux/amd64 -f ./Dockerfile -t ${{ secrets.DOCKERHUB_USERNAME }}/plat_server .
- name: Push Docker
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/plat_server:latest

Expand All @@ -48,11 +54,11 @@ jobs:
CURRENT_UPSTREAM=green
fi
echo CURRENT_UPSTREAM=$CURRENT_UPSTREAM >> $GITHUB_ENV
if [ $CURRENT_UPSTREAM = "blue" ]; then
if [ $CURRENT_UPSTREAM = blue ]; then
echo "CURRENT_PORT=8080" >> $GITHUB_ENV
echo "STOPPED_PORT=8081" >> $GITHUB_ENV
echo "TARGET_UPSTREAM=green" >> $GITHUB_ENV
elif [ $CURRENT_UPSTREAM = "green" ]; then
elif [ $CURRENT_UPSTREAM = green ]; then
echo "CURRENT_PORT=8081" >> $GITHUB_ENV
echo "STOPPED_PORT=8080" >> $GITHUB_ENV
echo "TARGET_UPSTREAM=blue" >> $GITHUB_ENV
Expand All @@ -76,7 +82,7 @@ jobs:
uses: jtalk/url-health-check-action@v3
with:
url: http://${{ secrets.PLAT_SERVER_IP }}:${{env.STOPPED_PORT}}/env
max-attempts: 3
max-attempts: 5
retry-delay: 10s

- name: Change nginx upstream
Expand Down

0 comments on commit e418c12

Please sign in to comment.