Skip to content

Commit

Permalink
Merge pull request #13 from Team-baebae/feature/ci/#9
Browse files Browse the repository at this point in the history
Feature/ci/#9
  • Loading branch information
tioon authored Apr 23, 2024
2 parents 00b4114 + 4cb8e7a commit 55cef49
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/Deploy-CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Feature Branch CI

on:
push:
branches:
- main

jobs:
build-and-package:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Create and configure application.yml
run: |
echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml
echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml
- name: Build with Gradle
run: |
cd baebae-BE
chmod +x ./gradlew
./gradlew build
- name: Create deployment package
run: |
zip -r deploy-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar
- name: Configure AWS CLI && Upload file to Object Storage
env:
AWS_ACCESS_KEY_ID: ${{ secrets.NAVER_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NAVER_SECRET_KEY }}
AWS_DEFAULT_REGION: 'us-east-2'
run: |
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp test-package.zip s3://baebae-bucket/deploy-package
44 changes: 44 additions & 0 deletions .github/workflows/Test-CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Feature Branch CI

on:
push:
branches:
- develop

jobs:
build-and-package:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Create and configure application.yml
run: |
echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml
echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml
- name: Build with Gradle
run: |
cd baebae-BE
chmod +x ./gradlew
./gradlew build
- name: Create deployment package
run: |
zip -r test-package.zip baebae-BE/build/libs/baebae-BE-0.0.1-SNAPSHOT.jar
- name: Configure AWS CLI && Upload file to Object Storage
env:
AWS_ACCESS_KEY_ID: ${{ secrets.NAVER_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NAVER_SECRET_KEY }}
AWS_DEFAULT_REGION: 'us-east-2'
run: |
aws --endpoint-url=https://kr.object.ncloudstorage.com s3 cp test-package.zip s3://baebae-bucket/test-package
39 changes: 39 additions & 0 deletions .github/workflows/feture-CI.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Feature Branch CI

on:
push:
branches:
- feature/**
- fix
- hotfix
pull_request:
branches:
- main
- develop
- fix
- hotfix

jobs:
build-and-package:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'

- name: Create and configure application.yml
run: |
echo "${{ secrets.APPLICATION_YML }}" > baebae-BE/src/main/resources/application.yml
echo "${{ secrets.APPLICATION_DEPLOY_YML }}" > baebae-BE/src/main/resources/application-deploy.yml
- name: Build with Gradle
run: |
cd baebae-BE
chmod +x ./gradlew
./gradlew build

0 comments on commit 55cef49

Please sign in to comment.