fix : 관심셀럽 조회 시 카테고리 순서 변경 #195
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
name: dev CI/CD | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
dev-ci-cd: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Latest Repo | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run : chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build | |
- name: Docker build | |
run: | | |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | |
docker build -t sluv-springboot-main-cicd . | |
docker tag sluv-springboot-main-cicd sluv2323/sluv-springboot-main-cicd:latest | |
docker push sluv2323/sluv-springboot-main-cicd:latest | |
- name: Get timestamp | |
uses: gerred/actions/current-time@master | |
id: current-time | |
- name: Run string replace | |
uses: frabert/replace-string-action@master | |
id: format-time | |
with: | |
pattern: '[:\.]+' | |
string: "${{ steps.current-time.outputs.time }}" | |
replace-with: '-' | |
flags: 'g' | |
- name: Beanstalk Deploy | |
uses: einaregilsson/beanstalk-deploy@v21 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
application_name: sluv-dev | |
environment_name: Sluvdev-env | |
version_label: "github-action--${{ steps.format-time.outputs.replaced }}" | |
region: ap-northeast-2 | |
deployment_package: Dockerrun.aws.json | |
wait_for_environment_recovery: 180 | |
current-time: | |
needs: dev-ci-cd | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get Current Time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH:mm:ss | |
utcOffset: "+09:00" # 기준이 UTC이기 때문에 한국시간인 KST를 맞추기 위해 +9시간 추가 | |
- name: Print Current Time | |
run: echo "Current Time=${{steps.current-time.outputs.formattedTime}}" # current-time 에서 지정한 포맷대로 현재 시간 출력 | |
shell: bash | |
## slack | |
action-slack: | |
needs: dev-ci-cd | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Alarm | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: GitHub-Actions CI/CD | |
fields: repo,message,commit,author,ref,job,took | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required | |
if: always() # Pick up events even if the job fails or is canceled. | |