Skip to content

Commit

Permalink
Create service-eat-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGANGLOFF authored Apr 22, 2024
1 parent 16fa56d commit bd31faa
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/service-eat-deploy
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Service Eat

on:
workflow_run:
workflows: ["Rust-eat"]
types:
- completed
workflow_dispatch:

jobs:
build-push-and-deploy:
runs-on: debian:bookworm@sha256:c2cedd7f80a4dd0f9f80d3699bd433ccf3de33ab63bfa2d4c4ba870c998222d6
steps:
- uses: actions/checkout@v2

- name: Build the Docker image
run: docker build . --file Dockerfile --tag d3spina/t-web-800:eat-latest

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Push the Docker image
run: docker push d3spina/t-web-800:eat-latest

- name: Set up Kubeconfig
run: echo "${{ secrets.KUBE_CONFIG }}" | base64 --decode > $HOME/.kube/config

- name: Deploy to Kubernetes
run: |
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
kubectl rollout status deployment/eat -n eat

0 comments on commit bd31faa

Please sign in to comment.