From ff36b182d10484432b5d3d5b3167f46eea100118 Mon Sep 17 00:00:00 2001 From: areeqakbr Date: Mon, 17 Feb 2025 16:32:40 +0700 Subject: [PATCH] edit deploy to kube --- .gitea/workflows/dev.yaml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/dev.yaml b/.gitea/workflows/dev.yaml index d88f44f..31aa372 100644 --- a/.gitea/workflows/dev.yaml +++ b/.gitea/workflows/dev.yaml @@ -39,7 +39,7 @@ jobs: git.winteraccess.id/winter-access/backend_nam:latest deploy: - name: Deploy to Kubernetes Cluster + name: Deploy to kubernetes cluster runs-on: ubuntu-latest needs: - build @@ -48,34 +48,29 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v3 - - name: Get short SHA id: get-short-sha run: | id=$(echo ${{ github.sha }} | cut -c 1-7) - echo "id=$id" >> $GITHUB_ENV - + echo "::set-output name=id::$id" - name: Create Kubeconfig run: | - mkdir -p $HOME/.kube - echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config - + mkdir $HOME/.kube + echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config - name: Setup Kubectl uses: azure/setup-kubectl@v4 - - name: Set the Kubernetes context uses: azure/k8s-set-context@v2 with: method: service-account k8s-url: ${{ vars.KUBE_URL }} k8s-secret: ${{ secrets.KUBE_SECRET }} - - - name: Deploy to Kubernetes cluster + - name: Deploy to the Kubernetes cluster uses: azure/k8s-deploy@v5 with: action: deploy - namespace: nam-backend-dev + namespace: walanja-dev manifests: | deploy/kubernetes/dev.yaml images: | - git.winteraccess.id/winter-access/backend_nam:dev-${{ env.id }} + git.winteraccess.id/winter-access/backend_nam:${{ steps.get-version.outputs.version }}-dev-${{ steps.get-short-sha.outputs.id }} \ No newline at end of file