Feat: 최근 접속 일시 업데이트 API 구현 #7
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: B.Link Dev CI/CD | |
on: | |
push: | |
branches: | |
- dev | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- 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 | |
shell: bash | |
- name: Build with Gradle | |
run: ./gradlew clean build -x test | |
shell: bash | |
- name: Get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY-MM-DDTHH-mm-ss | |
utcOffset: "+09:00" | |
- name: Show Current Time | |
run: echo "CurrentTime=${{ steps.current-time.outputs.formattedTime }}" | |
shell: bash | |
- name: Check Profile | |
run: echo "SPRING_PROFILES_ACTIVE=${{ env.SPRING_PROFILES_ACTIVE }}" | |
- name: Generate deployment package | |
run: | | |
mkdir -p deploy | |
cp build/libs/*.jar deploy/application.jar | |
cp Procfile deploy/Procfile | |
cp -r .ebextensions deploy/.ebextensions | |
cp -r .platform deploy/.platform | |
cd deploy && zip -r deploy.zip . | |
- name: BeanStalk Deploy | |
uses: einaregilsson/beanstalk-deploy@v20 | |
with: | |
aws_access_key: ${{ secrets.AWS_ACTION_ACCESS_KEY_ID }} | |
aws_secret_key: ${{ secrets.AWS_ACTION_SECRET_ACCESS_KEY }} | |
region: 'ap-northeast-2' | |
application_name: 'blink-test' | |
environment_name: 'Blink-test-env' | |
version_label: github-action-${{ steps.current-time.outputs.formattedTime }} | |
deployment_package: deploy/deploy.zip | |
wait_for_deployment: false | |
env: | |
SPRING_PROFILES_ACTIVE: dev |