-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (25 loc) · 987 Bytes
/
docker-CI.yml
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
name: CI/CD to Azure Container Instance
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to Docker Hub
run: docker login -u ${{ secrets.USER }} -p ${{ secrets.password }}
- name: List Docker images
run: docker images
- name: Build and push Docker image
run: |
docker build -t ${{ secrets.USER }}/streaming-app-des-nest-app:v1 .
docker push ${{ secrets.USER }}/streaming-app-des-nest-app:v1
- name: Deploy to ACI
run: |
az container delete --resource-group deploy_container --name streaming-app-container --yes
- name: Create new ACI with updated image
run: |
az container create --resource-group deploy_container --name streaming-app-container --image ${{ secrets.USER }}/streaming-app-des-nest-app:v1 --dns-name-label streaming-api --query ipAddress.fqdn --ports 3000