Skip to content

Commit

Permalink
Add continuis integration flow
Browse files Browse the repository at this point in the history
  • Loading branch information
stark275 committed Jun 5, 2024
1 parent 1d8a7d3 commit c0fc5de
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Continious Integration flow
on:
push:
branches:
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: ./code/docker/4-kapend/myfirst
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/kapend:${{ github.sha }}

- name: Update Kubernetes Manifest
run: |
sed -i "s|usename/kapend:[a-z0-9]*|${{ secrets.DOCKERHUB_USERNAME }}/kapend:${{ github.sha }}|g" code/docker/4-kapend/myfirst/k8s/03-kapend.yaml
11 changes: 11 additions & 0 deletions code/kubernetes/apps/kapend/deplyment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,17 @@
"microk8s kubectl apply -f app.yaml\n",
"```\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Lancer les pod de l'application Django seulement si la base de donnée est prete\n",
"\n",
"```yaml\n",
"\n",
"```"
]
}
],
"metadata": {
Expand Down

0 comments on commit c0fc5de

Please sign in to comment.