Skip to content

Commit

Permalink
chore: Spotless가 YAML 파일을 체크하도록 설정 추가 (#252)
Browse files Browse the repository at this point in the history
* chore: YAML 포맷팅 설정 추가

* chore: spotless yaml 적용
  • Loading branch information
uwoobeat authored Mar 4, 2024
1 parent 1ef7d5a commit e462a38
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 26 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/develop_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy to Develop

on:
push:
branches: [ "develop" ]
branches: ["develop"]

permissions:
id-token: write
Expand All @@ -17,8 +17,8 @@ jobs:
environment: develop
strategy:
matrix:
java-version: [ 17 ]
distribution: [ 'temurin' ]
java-version: [17]
distribution: ["temurin"]
steps:
# 체크아웃
- name: Checkout
Expand Down Expand Up @@ -103,12 +103,13 @@ jobs:
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_EMBEDS: '[
{
"title": "푸드덕푸드덕푸드덕",
"description": "구구구구국 구구...: ${{ steps.gradle.outputs.build-scan-url }}"
}
]'
DISCORD_EMBEDS: |
[
{
"title": "푸드덕푸드덕푸드덕",
"description": "구구구구국 구구...: ${{ steps.gradle.outputs.build-scan-url }}"
}
]
# EC2로 배포
- name: Deploy to EC2 Server
Expand All @@ -120,7 +121,7 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
script: |
aws s3 cp ${{ env.S3_COPY_PATH }} docker-compose.yml
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/develop_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
commit_hash:
description: 'commit_hash'
description: "commit_hash"
required: true

jobs:
Expand All @@ -21,7 +21,7 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
script: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
docker pull ${{ env.IMAGE_FULL_URL }}
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/production_build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
environment: production
strategy:
matrix:
java-version: [ 17 ]
distribution: [ 'temurin' ]
java-version: [17]
distribution: ["temurin"]
steps:
# 체크아웃
- name: Checkout
Expand Down Expand Up @@ -119,12 +119,13 @@ jobs:
uses: Ilshidur/action-discord@master
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
DISCORD_EMBEDS: '[
{
"title": "푸드덕푸드덕푸드덕",
"description": "구구구구국 구구...: ${{ steps.gradle.outputs.build-scan-url }}"
}
]'
DISCORD_EMBEDS: |
[
{
"title": "푸드덕푸드덕푸드덕",
"description": "구구구구국 구구...: ${{ steps.gradle.outputs.build-scan-url }}"
}
]
- name: Deploy to EC2 Server
uses: appleboy/ssh-action@master
Expand All @@ -135,7 +136,7 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
script: |
aws s3 cp ${{ env.S3_COPY_PATH }} docker-compose.yml
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/production_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
semver:
description: 'semver without v'
description: "semver without v"
required: true

jobs:
Expand All @@ -21,7 +21,7 @@ jobs:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USERNAME }}
key: ${{ secrets.EC2_PRIVATE_KEY }}
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
envs: IMAGE_FULL_URL # docker-compose.yml 에서 사용할 환경 변수
script: |
echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
docker pull ${{ env.IMAGE_FULL_URL }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull_request_gradle_build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name : Check Style and Test to Develop
name: Check Style and Test to Develop

on:
pull_request:
branches: [ "develop" ]
branches: ["develop"]

jobs:
build-test:
Expand Down
7 changes: 6 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jar {

spotless {
format 'misc', {
target '**/*.yml', '**/*.gradle', '**/*.md'
target '**/*.gradle', '**/*.md'
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
Expand All @@ -102,6 +102,11 @@ spotless {
palantirJavaFormat()
formatAnnotations()
}

yaml {
target '**/*.yml'
prettier()
}
}

tasks.register('updateGitHooks', Copy) {
Expand Down

0 comments on commit e462a38

Please sign in to comment.