From 259ed74066b33035a8364c62f9053ca39162be08 Mon Sep 17 00:00:00 2001 From: SeongHoon Park Date: Thu, 11 Jan 2024 15:02:10 +0900 Subject: [PATCH] feat: ci.yml k8s deploy job added --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 844f169..db3882b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,3 +60,33 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max + + kubernetes-resource-update: + name: Kubernetes resource update + runs-on: ubuntu-latest + needs: build + + steps: + - name: Setup Kustomize + uses: imranismail/setup-kustomize@v1 + + - name: Checkout kustomize repo + uses: actions/checkout@v2 + with: + repository: inje-megabrain/megabrain-infra-apps + ref: apps/megabrain-site + token: ${{ secrets.REPO_ACCESS_TOKEN }} + + - name: Update Kubernetes resource + run: | + cd apps/megabrain-site/overlays/dev + kustomize edit set image + cat kustomization.yaml + + - name: Commit and push changes + run: | + cd apps/megabrain-site + git config --global user.name + git config --global user.email + git commit -am "Update k8s image" + git push -u origin apps/megabrain-site