Skip to content

Commit

Permalink
chore(ci): Remove deployment step.
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Westra <[email protected]>
  • Loading branch information
webstradev committed Oct 10, 2024
1 parent 672dc8c commit 5f578f2
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,4 @@ jobs:
- name: Login to Docker Hub
run: echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ vars.DOCKER_HUB_USERNAME }} --password-stdin
- name: Push Docker Image
run: docker push ${{ vars.DOCKER_HUB_USERNAME }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ github.sha }}

deploy:
needs: [test, build]
name: Deploy to Kubernetes
runs-on: ubuntu-latest
steps:
- name: Set the Kubernetes context
uses: azure/k8s-set-context@v3
with:
method: service-account
k8s-url: ${{ secrets.KUBERNETES_URL }}
k8s-secret: ${{ secrets.KUBERNETES_SECRET }}

- name: Checkout source code
uses: actions/checkout@v4

- name: Set docker image in deployment file
run: sed -i "s#__DOCKER_IMAGE__#'${{ vars.DOCKER_HUB_USERNAME }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ github.sha }}'#" ./kube/deployment.yaml

- name: Deploy to the Kubernetes cluster
run: |
kubectl apply -f ./kube/deployment.yaml
kubectl rollout status -f ./kube/deployment.yaml -w
run: docker push ${{ vars.DOCKER_HUB_USERNAME }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ github.sha }}

0 comments on commit 5f578f2

Please sign in to comment.