Skip to content

Commit

Permalink
[KAN-79] MYSQL -> ES 동기화 배치 작업
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkyoungdeok committed May 21, 2024
1 parent 9bbc969 commit 5dbfc27
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/mysql-to-es-batch-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Mysql To ElasticSearch Batch Job

on:
pull_request:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: '0 2 * * *'

jobs:
batch-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Build And Push
run: |
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }}
docker build -f mysql-to-es.Dockerfile -t skku-mysql-to-es-batch .
docker tag skku-mysql-to-es-batch sinkyoungdeok/skku-mysql-to-es-batch
docker push sinkyoungdeok/skku-mysql-to-es-batch
- name: Deploy Prod
uses: appleboy/ssh-action@v0.1.4
with:
key: ${{ secrets.SSH_KEY }}
host: ${{ secrets.HOST_NAME }}
username: ubuntu
port: 22
script: |
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }}
docker pull sinkyoungdeok/skku-mysql-to-es-batch
docker run --net ubuntu_default sinkyoungdeok/skku-mysql-to-es-batch

0 comments on commit 5dbfc27

Please sign in to comment.