Skip to content

Updated CI/CD Pipeline #61

Updated CI/CD Pipeline

Updated CI/CD Pipeline #61

Workflow file for this run

name: Frontend CI - Build & Push Image (Router)

Check failure on line 1 in .github/workflows/frontend_ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/frontend_ci.yml

Invalid workflow file

(Line: 61, Col: 9): Unexpected value 'secrets'
on:
workflow_dispatch:
push:
branches:
- development
- main
paths:
- 'frontend/**'
- '.github/workflows/frontend_ci.yml'
pull_request:
branches:
- main
paths:
- 'frontend/**'
- '.github/workflows/frontend_ci.yml'
env:
ACR_LOGIN_SERVER: ${{ secrets.AZURE_CONTAINER_REGISTRY }}
IMAGE_TAG: ${{ github.sha }}-${{ github.run_id }}
jobs:
build_and_push_frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Azure Login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Login to Azure Container Registry
run: az acr login --name ${{ env.ACR_LOGIN_SERVER }}
- name: Build and Push Frontend Image
run: |
docker build -t ${{ env.ACR_LOGIN_SERVER }}/frontend:latest ./frontend/
docker push ${{ env.ACR_LOGIN_SERVER }}/frontend:latest
- name: Logout from Azure
run: az logout
if: always()
trigger_frontend_cd:
needs: build_and_push_frontend
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Trigger Frontend CD workflow
uses: ./.github/workflows/frontend-cd.yml
with:
product_api_ip: "20.92.168.148"
order_api_ip: "20.92.168.149"
aks_cluster_name: "ishaanAKS"
aks_resource_group: "deakinuni"
secrets:
azure_credentials: ${{ secrets.AZURE_CREDENTIALS }}