feat: 메인페이지 그룹 API 페이징 적용 #165
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 workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: from DEVELOP to MAIN | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-northeast-2 | |
## gradle caching | |
- name: Gradle 캐싱 | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Make application.yml | |
run: | | |
cd ./src/main | |
ls | |
cd ./resources | |
touch ./application.yml | |
touch ./application-dev.yml | |
echo "$APPLICATION" > ./application.yml | |
echo "$APPLICATION_DEV" > ./application-dev.yml | |
env: | |
APPLICATION: ${{ secrets.APPLICATION }} | |
APPLICATION_DEV: ${{ secrets.APPLICATION_DEV }} | |
shell: bash | |
- name: Gradle 권한 부여 | |
run: | | |
chmod +x gradlew | |
- name: Gradle로 빌드 실행 | |
run: | | |
./gradlew bootjar | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
# - name: Build, tag, and push image to Amazon ECR | |
# id: build-image | |
# env: | |
# ECR_REGISTRY: ${{secrets.ECR_REGISTRY}} | |
# IMAGE_TAG: ${{secrets.IMAGE_TAG}} | |
# IMAGE_NAME: ${{secrets.IMAGE_NAME}} | |
# run: | | |
# docker build --platform=linux/amd64 -t $IMAGE_NAME . | |
# docker tag $IMAGE_NAME:$IMAGE_TAG $ECR_REGISTRY/$IMAGE_NAME:$IMAGE_TAG | |
# docker push $ECR_REGISTRY/$IMAGE_NAME:$IMAGE_TAG | |
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. | |
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | |
approval: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Request approval | |
# uses: hmarr/auto-approve-action@v2 | |
# with: | |
# github_token: ${{secrets.GIT_TOKEN}} | |
# reviewers: 'SangWoon123' | |
- name: Slack 알람 발송 | |
uses: slackapi/[email protected] | |
if: success() | |
with: | |
payload: | | |
{ | |
"attachments": [ | |
{ | |
"color": "good", | |
"title": "배포 성공", | |
"text": "배포가 성공적으로 완료되었습니다 자세한 내용을 보려면 여기를 클릭하세요: ", | |
"footer": "Github Actions", | |
"ts": ${Math.floor(Date.now()/1000)} | |
} | |
] | |
} | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |