Skip to content

Commit

Permalink
chore: cicd 스크립트에 redis 환경 셋
Browse files Browse the repository at this point in the history
  • Loading branch information
amaran-th committed Feb 28, 2024
1 parent 29bd140 commit 832ab8f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: workflow_dispatch

jobs:
build:
name: 빌드
runs-on: ubuntu-22.04
timeout-minutes: 10

Expand All @@ -18,6 +19,9 @@ jobs:
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
options: --health-cmd "redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=5

permissions:
id-token: write
Expand Down Expand Up @@ -62,3 +66,22 @@ jobs:
aws s3 mv --region ${{ secrets.AWS_REGION }} \
${GITHUB_SHA::8}.tar.gz \
${{ secrets.S3_PROD_BACK_LOCATION }}/${GITHUB_SHA::8}.tar.gz
deploy:
needs: build
name: 배포
runs-on: [ self-hosted, label-prod ]
steps:
- name: 쉘 스크립트 실행
working-directory: /home/ubuntu
run: |
chmod +x /home/ubuntu/deploy.sh
sudo /home/ubuntu/deploy.sh ${GITHUB_SHA::8}
- name: Slack으로 결과 전송
if: always()
uses: 8398a7/action-slack@v3
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
author_name: DOORE Production Backend CICD
fields: repo, commit, message, author, action, took

0 comments on commit 832ab8f

Please sign in to comment.