Skip to content

Commit

Permalink
style: #109 운영 프로파일 스웨거 깃헙 링크 추가 및 버전정보 표현
Browse files Browse the repository at this point in the history
  • Loading branch information
jaewonLeeKOR committed Apr 26, 2024
1 parent 9e25d1c commit 9812182
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cicd-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ jobs:
run: |
echo "REPOSITORY=$(echo $REPOSITORY | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV}
- name: Get Version
run: echo "VERSION=$(git tag --points-at)" >> ${GITHUB_ENV}

- name: Set Spring Image Environment Variable
run: |
echo "SPRING_IMAGE=${{ env.REGISTRY }}/${{ env.REPOSITORY }}-prod:${{ github.sha }}" >> ${GITHUB_ENV}
echo "SPRING_IMAGE=${{ env.REGISTRY }}/${{ env.REPOSITORY }}-prod:${{ env.VERSION }}" >> ${GITHUB_ENV}
- name: Write Version
run: |
echo "server-version: Prod" >> config/application.yml
echo -e "\nserver-version: ${{ env.VERSION }}" >> config/application-prod.yml
- name: Build Image
run: docker build --no-cache -t ${{ env.SPRING_IMAGE }} -f Dockerfile-deploy .
Expand Down
2 changes: 1 addition & 1 deletion config
6 changes: 5 additions & 1 deletion src/main/java/com/server/capple/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ public OpenAPI openAPI() {
Info info = new Info()
.title("Capple API Document")
.version(version)
.description("Capple API 명세서입니다.");
.description(
version.charAt(0) == 'v' ?
String.format("Capple API 명세서입니다.<br>[%s 변경사항](https://github.com/Team-Capple/Capple-Server/releases/tag/%s)",version, version)
: "Capple API 명세서입니다."
);
return new OpenAPI()
.components(new Components().addSecuritySchemes("bearerAuth", securityScheme))
.security(Arrays.asList(securityRequirement))
Expand Down

0 comments on commit 9812182

Please sign in to comment.