Skip to content

Commit

Permalink
Fix: mod deploy.yml for release
Browse files Browse the repository at this point in the history
  • Loading branch information
oo-ni committed Feb 2, 2024
1 parent e92c933 commit 5711798
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

permissions:
contents: read
actions: read

jobs:
build-docker-image:
Expand Down Expand Up @@ -45,7 +46,16 @@ jobs:
push: true
platforms: linux/amd64
tags: ${{ secrets.KC_REGISTRY_URL }}/${{ secrets.IMAGE_NAME }}:${{ github.event.release.tag_name }}, ${{ secrets.KC_REGISTRY_URL }}/${{ secrets.IMAGE_NAME }}:latest


- name: slack-notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,ref,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

update-k8s:
needs: build-docker-image
runs-on: ubuntu-latest
Expand Down Expand Up @@ -73,3 +83,34 @@ jobs:
git add ./backend/${{ env.DIRECTORY_NAME }}/${{ env.REPO_NAME }}-deployment.yaml
git commit -m "update: 이미지 버전 수정 ${{ secrets.IMAGE_NAME }} v${{ github.event.release.tag_name }} by Git Action"
git push
- name: slack-notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

- name: slack-notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,ref,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()

slack-notification:
needs: [build-docker-image, update-k8s]
runs-on: ubuntu-latest
steps:
- name: slack-notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,action,ref
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()

0 comments on commit 5711798

Please sign in to comment.