Skip to content

Merge pull request #61 from themoment-team/feat/popup #11

Merge pull request #61 from themoment-team/feat/popup

Merge pull request #61 from themoment-team/feat/popup #11

Workflow file for this run

name: official-gsm-client-server-ci
on:
push:
branches: [ "develop" ]
workflow_dispatch:
jobs:
CI:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Set up JDK 17 job has success
if: ${{ success() }}
run: echo "set-up JDK 17 is succeeded"
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name : Setup Gradle permission
run : chmod +x gradlew
- name : make yml file
run : mkdir ./src/main/resources
touch ./src/main/resources/application.yml
echo "${{ secrets.YML }}" > ./src/main/resources/application.yml
shell: bash
- name: Build with Gradle
run : ./gradlew clean build --exclude-task test
- 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
- name: Make zip file
run: zip -r ./$GITHUB_SHA.zip .
shell: bash
- name: Upload to S3
run: aws s3 cp --region ${{ secrets.AWS_REGION }} ./$GITHUB_SHA.zip s3://${{ secrets.BUCKET_NAME }}/client/$GITHUB_SHA.zip
- name: Code Deploy
run: aws deploy create-deployment --application-name ${{ secrets.CODE_DEPLOY_APP_NAME }} --deployment-config-name CodeDeployDefault.AllAtOnce --deployment-group-name ${{ secrets.DEPLOYMENT_GROUP_NAME }} --s3-location bucket=${{ secrets.BUCKET_NAME }},bundleType=zip,key=client/$GITHUB_SHA.zip
- name: official-gsm-client-server-ci-success
uses: sarisia/actions-status-discord@v1
if: ${{ success() }}
with:
title: official-gsm-client-server-ci-success
webhook: ${{ secrets.DISCORD_WEBHOOK }}
color: 00FF00
- name: official-gsm-client-server-ci-failed
uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
title: official-gsm-client-server-ci-failed
webhook: ${{ secrets.DISCORD_WEBHOOK }}
color: FF0000