-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 972 Bytes
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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|stark275/kapend:[a-z0-9]*|${{ secrets.DOCKERHUB_USERNAME }}/kapend:${{ github.sha }}|g" ./code/docker/4-kapend/myfirst/k8s/03-kapend.yaml