Skip to content

Sentiment Dashboard Update CI/CD #3

Sentiment Dashboard Update CI/CD

Sentiment Dashboard Update CI/CD #3

Workflow file for this run

name: Sentiment Dashboard Update CI/CD
on:
push:
branches: [ main ]
paths-ignore:
- ".github/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: streamlitistat.azurecr.io/
username: streamlitistat
password: ${{ secrets.STREAMLITISTAT_PASSWORD }}
- name: Build and push container image to registry
uses: docker/build-push-action@v6
with:
push: true
tags: streamlitistat.azurecr.io/sentiment-dashboard:1.0.${{ github.run_number }},streamlitistat.azurecr.io/sentiment-dashboard:latest
context: .
build-args: "DOCKER_TAG=1.0.${{ github.run_number }}"
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: production
steps:
- uses: actions/checkout@v3
- name: Azure Login
uses: Azure/login@v1.4.3
with:
client-id: ${{ vars.AZ_CLIENT_ID }}
tenant-id: ${{ vars.AZ_TENANT_ID }}
subscription-id: ${{ vars.AZ_SUBSCRIPTION_ID }}
- name: Azure Container Apps Build and Deploy
uses: Azure/container-apps-deploy-action@v2
with:
acrName: streamlitistat
imageToDeploy: streamlitistat.azurecr.io/sentiment-dashboard:1.0.${{ github.run_number }}
resourceGroup: RG-Streamlit
containerAppEnvironment: cae-streamlit
containerAppName: ca-sentiment-dashboard
targetPort: 8501
ingress: external