Skip to content

Mysql To ElasticSearch Batch Job #21

Mysql To ElasticSearch Batch Job

Mysql To ElasticSearch Batch Job #21

name: Mysql To ElasticSearch Batch Job
on:
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/[email protected]
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