fixing actions #189
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 login -u [email protected] -p Chu090697 | |
az container delete --resource-group soundspace2024 --name streaming-api --yes | |
- name: Create new ACI with updated image | |
run: | | |
az container create --resource-group soundspace2024 --name streaming-api --image ${{ secrets.USER }}/streaming-app-des-nest-app:v1 --dns-name-label streaming-api --environment-variables HOST=${{ secrets.HOST }} --query ipAddress.fqdn --ports 3000 | |