File tree Expand file tree Collapse file tree 1 file changed +48
-1
lines changed
Expand file tree Collapse file tree 1 file changed +48
-1
lines changed Original file line number Diff line number Diff line change 5454 - name : Run ESLint (code quality check)
5555 run : |
5656 cd src/frontend
57- npm run lint -- --max-warnings=0 --quiet
57+ npm run lint -- --max-warnings=0 --quiet
58+
59+ build-and-push :
60+ runs-on : ubuntu-latest
61+ needs : [unit-testing, code-quality]
62+ steps :
63+ - name : Checkout code
64+ uses : actions/checkout@v4
65+
66+ - name : Install Docker
67+ uses : docker/setup-buildx-action@v1
68+
69+ - name : Login to Docker
70+ uses : docker/login-action@v2
71+ with :
72+ username : ${{ secrets.DOCKER_USERNAME }}
73+ password : ${{ secrets.DOCKER_PASSWORD }}
74+
75+ - name : Build and push Docker image
76+ uses : docker/build-push-action@v3
77+ with :
78+ context : .
79+ file : ./src/frontend/Dockerfile
80+
81+ push : true
82+ tags : neamulkabiremon/checkout:${{ github.sha }}
83+
84+ update-k8s-deployment :
85+ runs-on : ubuntu-latest
86+ needs : build-and-push
87+ steps :
88+ - name : Checkout code
89+ uses : actions/checkout@v4
90+ with :
91+ token : ${{ secrets.GITHUB_TOKEN }}
92+
93+ - name : Update Kubernetes Deployment
94+ run : |
95+ sed -i "s|image: .*|image: ${{ secrets.DOCKER_USERNAME }}/frontend:${{ github.sha }}|" kubernetes/frontend/deploy.yaml
96+ cat kubernetes/frontend/deploy.yaml
97+
98+ - name : Commit and push updated Kubernetes manifest
99+ run : |
100+ git config --global user.email "neamulkabiremon@gmail.com"
101+ git config --global user.name "neamulkabiremon"
102+ git add kubernetes/frontend/deploy.yaml
103+ git commit -m "[CI]: Update checkout deployment image tag"
104+ git push
You can’t perform that action at this time.
0 commit comments