Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

백엔드 마이그레이션 작업 #700

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 62 additions & 62 deletions .github/workflows/dev-be-ci-cd-push.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
name: dev/BE CD on Push

on:
push:
branches: [ "dev/BE" ]

jobs:
build:
runs-on: ubuntu-22.04

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.SUBMODULE_BE_TOKEN }}
submodules: recursive

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

- name: Build with Gradle
uses: gradle/[email protected]
- name: Execute Gradle build
run: |
cd backend/baton
./gradlew build
- name: Setup Docker buildx
uses: docker/[email protected]

- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_DEV_USERNAME }}
password: ${{ secrets.DOCKERHUB_DEV_TOKEN }}

- name: Docker Image Build
run: |
cd backend/baton
docker build --platform linux/arm64/v8 -t 2023baton/2023baton -f Dockerfile-dev .
- name: Docker Hub Push
run: docker push 2023baton/2023baton

deploy:
runs-on: [ self-hosted, Linux, ARM64, dev ]
needs: build

steps:

- name: Pull Latest Docker Image
run: |
sudo docker login --username ${{ secrets.DOCKERHUB_DEV_USERNAME }} --password ${{ secrets.DOCKERHUB_DEV_TOKEN }}
sudo docker pull 2023baton/2023baton:latest
- name: Docker Compose
run: |
/home/ubuntu/zero-downtime-deploy.sh
sudo docker image prune -af
# name: dev/BE CD on Push
#
# on:
# push:
# branches: [ "dev/BE" ]
#
# jobs:
# build:
# runs-on: ubuntu-22.04
#
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# with:
# token: ${{ secrets.SUBMODULE_BE_TOKEN }}
# submodules: recursive
#
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'corretto'
#
# - name: Build with Gradle
# uses: gradle/[email protected]
# - name: Execute Gradle build
# run: |
# cd backend/baton
# ./gradlew build
#
# - name: Setup Docker buildx
# uses: docker/[email protected]
#
# - name: Login to Docker Hub
# uses: docker/[email protected]
# with:
# username: ${{ secrets.DOCKERHUB_DEV_USERNAME }}
# password: ${{ secrets.DOCKERHUB_DEV_TOKEN }}
#
# - name: Docker Image Build
# run: |
# cd backend/baton
# docker build --platform linux/arm64/v8 -t 2023baton/2023baton -f Dockerfile-dev .
#
# - name: Docker Hub Push
# run: docker push 2023baton/2023baton
#
# deploy:
# runs-on: [ self-hosted, Linux, ARM64, dev ]
# needs: build
#
# steps:
#
# - name: Pull Latest Docker Image
# run: |
# sudo docker login --username ${{ secrets.DOCKERHUB_DEV_USERNAME }} --password ${{ secrets.DOCKERHUB_DEV_TOKEN }}
# sudo docker pull 2023baton/2023baton:latest
#
# - name: Docker Compose
# run: |
# /home/ubuntu/zero-downtime-deploy.sh
# sudo docker image prune -af
2 changes: 1 addition & 1 deletion backend/baton/secret