-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
398fc9f
commit 0ce2c44
Showing
2 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,36 +38,44 @@ jobs: | |
with: | ||
ref: ${{ github.event.push.base_ref }} | ||
|
||
# 2. 자바 환경 설정 | ||
# 2. 버전 정보 추출 (태그 정보에서 *.*.*만 추출) | ||
- name: Get Version | ||
id: get_version | ||
run: | | ||
RELEASE_VERSION_WITHOUT_V="$(cut -d'v' -f2 <<< ${GITHUB_REF#refs/*/})" | ||
echo "VERSION=$RELEASE_VERSION_WITHOUT_V" >> $GITHUB_OUTPUT | ||
# 3. 자바 환경 설정 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# 3. FCM Admin SDK 파일 생성 | ||
# 4. FCM Admin SDK 파일 생성 | ||
- name: Create Json | ||
uses: jsdaniell/[email protected] | ||
with: | ||
name: ${{ secrets.FIREBASE_ADMIN_SDK_FILE }} | ||
json: ${{ secrets.FIREBASE_ADMIN_SDK }} | ||
dir: ${{ secrets.FIREBASE_ADMIN_SDK_DIR }} | ||
|
||
# 4. Build Gradle | ||
# 5. Build Gradle | ||
- name: Build Gradle | ||
run: | | ||
chmod +x ./gradlew | ||
./gradlew :pennyway-app-external-api:build --parallel --stacktrace --info -x test | ||
shell: bash | ||
|
||
# 5. Docker 이미지 build 및 push | ||
# 6. Docker 이미지 build 및 push | ||
- name: docker build and push | ||
run: | | ||
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker build -t pennyway/pennyway-was ./pennyway-app-external-api | ||
docker push pennyway/pennyway-was | ||
docker push pennyway/pennyway-was:${{ steps.get_version.outputs.VERSION }} | ||
docker push pennyway/pennyway-was:latest | ||
# 6. AWS SSM을 통한 Run-Command (Docker 이미지 pull 후 docker-compose를 통한 실행) | ||
# 7. AWS SSM을 통한 Run-Command (Docker 이미지 pull 후 docker-compose를 통한 실행) | ||
- name: AWS SSM Send-Command | ||
uses: peterkimzz/aws-ssm-send-command@master | ||
id: ssm | ||
|