From 01f8c09ff47f1f297505ddc54967b9251b955eb0 Mon Sep 17 00:00:00 2001 From: LeoOMaia Date: Sat, 25 Nov 2023 18:30:10 +0000 Subject: [PATCH] adding .github for Dockerhub images and directores for Kubernetes --- .github/workflows/docker.yml | 35 +++++++++++++++++++++++++++++++++++ Kubernetes/deployment.yaml | 0 Kubernetes/persistent.yaml | 0 Kubernetes/service.yaml | 0 4 files changed, 35 insertions(+) create mode 100644 .github/workflows/docker.yml create mode 100644 Kubernetes/deployment.yaml create mode 100644 Kubernetes/persistent.yaml create mode 100644 Kubernetes/service.yaml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..410eeb8 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + push_to_registry: + name: Push Docker images + runs-on: ubuntu-latest + steps: + - name: Check repository + uses: actions/checkout@v3 + + - name: User and Token for Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.CLOUDTP2_USERNAME }} + password: ${{ secrets.CLOUDTP2_TOKEN }} + + - name: Build and Push image to change Machine Learning container + uses: docker/build-push-action@v4 + with: + context: Train_model/ + push: true + tags: leoomaia/ml_cloud + + - name: Build and push Docker image for Rest_API server + uses: docker/build-push-action@v4 + with: + context: Rest_API/ + push: true + tags: leoomaia/server_cloud \ No newline at end of file diff --git a/Kubernetes/deployment.yaml b/Kubernetes/deployment.yaml new file mode 100644 index 0000000..e69de29 diff --git a/Kubernetes/persistent.yaml b/Kubernetes/persistent.yaml new file mode 100644 index 0000000..e69de29 diff --git a/Kubernetes/service.yaml b/Kubernetes/service.yaml new file mode 100644 index 0000000..e69de29