Skip to content

Commit

Permalink
fix: syntax 오류 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
fromitive committed Oct 24, 2024
1 parent 69e9084 commit 1c09477
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/backend-prod-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
- ".github/workflows/backend-prod-ci-cd.yml"
- "Dockerfile"
pull_request:
branches: [ "main" ]
paths:
- "backend/**"
- ".github/workflows/backend-prod-ci-cd.yml"
- "Dockerfile"
branches: [ "main" ]
paths:
- "backend/**"
- ".github/workflows/backend-prod-ci-cd.yml"
- "Dockerfile"

jobs:

Expand Down Expand Up @@ -45,9 +45,9 @@ jobs:
run: |
echo "${{ secrets.APPLICATION_PROPERTIES_PROD }}" > src/main/resources/application.properties
mkdir -p src/main/resources/fcm
echo '${{ secrets.FCM_SECRET_KEY }}' > src/main/resources/fcm/chongdaemarket-fcm-key.json
echo "${{ secrets.FCM_SECRET_KEY }}" > src/main/resources/fcm/chongdaemarket-fcm-key.json
mkdir -p src/test/resources/fcm
echo '${{ secrets.FCM_SECRET_KEY }}' > src/test/resources/fcm/chongdaemarket-fcm-key.json
echo "${{ secrets.FCM_SECRET_KEY }}" > src/test/resources/fcm/chongdaemarket-fcm-key.json
working-directory: ./backend

- name: Build with Gradle Wrapper
Expand All @@ -58,23 +58,23 @@ jobs:
run: |
docker login -u ${{ secrets.BE_DOCKERHUB_USERNAME }} -p ${{ secrets.BE_DOCKERHUB_PASSWORD }}
docker build -t ${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }} .
docker tag ${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }} ${{ secrets.BE_DOCKERHUB_USERNAME }}/${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }}:${GITHUB_SHA::7}
docker push ${{ secrets.BE_DOCKERHUB_USERNAME }}/${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }}:${GITHUB_SHA::7}
docker tag ${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }} ${{ secrets.BE_DOCKERHUB_USERNAME }}/${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }}:${{ github.sha::7 }}
docker push ${{ secrets.BE_DOCKERHUB_USERNAME }}/${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }}:${{ github.sha::7 }}
deploy-new-container:
needs: build-and-test
strategy:
matrix:
runner: [prod-a, prod-b]
runs-on: [ self-hosted, ${{ matrix.runner }} ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
runs-on: [ self-hosted, ${{ matrix.runner }} ]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Deploy new container on ${{ matrix.runner }}
run: |
bash launch_next_container.sh ${GITHUB_SHA::7} prod ${{ secrets.BE_DOCKERHUB_USERNAME }} ${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }}
working-directory: backend/deploy
- name: Deploy new container on ${{ matrix.runner }}
run: |
bash launch_next_container.sh ${GITHUB_SHA::7} prod ${{ secrets.BE_DOCKERHUB_USERNAME }} ${{ secrets.BE_DOCKER_IMAGE_NAME_PROD }}
working-directory: backend/deploy

switch-new-container:
needs: deploy-new-container
Expand Down

0 comments on commit 1c09477

Please sign in to comment.