edit deploy to kube
This commit is contained in:
parent
fadef5626b
commit
ff36b182d1
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
git.winteraccess.id/winter-access/backend_nam:latest
|
git.winteraccess.id/winter-access/backend_nam:latest
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy to Kubernetes Cluster
|
name: Deploy to kubernetes cluster
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build
|
- build
|
||||||
|
|
@ -48,34 +48,29 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get short SHA
|
- name: Get short SHA
|
||||||
id: get-short-sha
|
id: get-short-sha
|
||||||
run: |
|
run: |
|
||||||
id=$(echo ${{ github.sha }} | cut -c 1-7)
|
id=$(echo ${{ github.sha }} | cut -c 1-7)
|
||||||
echo "id=$id" >> $GITHUB_ENV
|
echo "::set-output name=id::$id"
|
||||||
|
|
||||||
- name: Create Kubeconfig
|
- name: Create Kubeconfig
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $HOME/.kube
|
mkdir $HOME/.kube
|
||||||
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
|
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
|
||||||
|
|
||||||
- name: Setup Kubectl
|
- name: Setup Kubectl
|
||||||
uses: azure/setup-kubectl@v4
|
uses: azure/setup-kubectl@v4
|
||||||
|
|
||||||
- name: Set the Kubernetes context
|
- name: Set the Kubernetes context
|
||||||
uses: azure/k8s-set-context@v2
|
uses: azure/k8s-set-context@v2
|
||||||
with:
|
with:
|
||||||
method: service-account
|
method: service-account
|
||||||
k8s-url: ${{ vars.KUBE_URL }}
|
k8s-url: ${{ vars.KUBE_URL }}
|
||||||
k8s-secret: ${{ secrets.KUBE_SECRET }}
|
k8s-secret: ${{ secrets.KUBE_SECRET }}
|
||||||
|
- name: Deploy to the Kubernetes cluster
|
||||||
- name: Deploy to Kubernetes cluster
|
|
||||||
uses: azure/k8s-deploy@v5
|
uses: azure/k8s-deploy@v5
|
||||||
with:
|
with:
|
||||||
action: deploy
|
action: deploy
|
||||||
namespace: nam-backend-dev
|
namespace: walanja-dev
|
||||||
manifests: |
|
manifests: |
|
||||||
deploy/kubernetes/dev.yaml
|
deploy/kubernetes/dev.yaml
|
||||||
images: |
|
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 }}
|
||||||
Loading…
Reference in New Issue