From 476b3f5c0da37932691c259e797ab19afdcd7f91 Mon Sep 17 00:00:00 2001 From: Sachin Date: Mon, 7 Sep 2026 13:06:31 +1000 Subject: [PATCH 1/3] Trigger Week 08 CD pipeline From 5f0184bce5b062f170da0aeb214dea38500ab597 Mon Sep 17 00:00:00 2001 From: Sachin Date: Sat, 26 Sep 2026 14:19:09 +1000 Subject: [PATCH 2/3] Enable continuous deployment to production --- .github/workflows/04-deploy-production.yml | 27 ++++++++++++---------- frontend/src/pages/Login.jsx | 2 +- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/04-deploy-production.yml b/.github/workflows/04-deploy-production.yml index 969d646b..2e51f9af 100644 --- a/.github/workflows/04-deploy-production.yml +++ b/.github/workflows/04-deploy-production.yml @@ -1,17 +1,20 @@ name: 04 - Deploy to Production on: - workflow_dispatch: - inputs: - image_tag: - description: "Tested image SHA to deploy" - required: true - type: string + workflow_run: + workflows: + - "03 - Test Staging" + types: + - completed + branches: + - main jobs: deploy-production: name: Deploy to Production runs-on: ubuntu-latest + if: > + ${{ github.event.workflow_run.conclusion == 'success' }} environment: name: production @@ -69,37 +72,37 @@ jobs: - name: Update frontend image run: | kubectl set image deployment/frontend \ - frontend=${{ vars.ACR_LOGIN_SERVER }}/koalatech-frontend:${{ inputs.image_tag }} \ + frontend=${{ vars.ACR_LOGIN_SERVER }}/koalatech-frontend:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update user-service image run: | kubectl set image deployment/user-service \ - user-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-user-service:${{ inputs.image_tag }} \ + user-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-user-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update student-service image run: | kubectl set image deployment/student-service \ - student-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-student-service:${{ inputs.image_tag }} \ + student-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-student-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update lecturer-service image run: | kubectl set image deployment/lecturer-service \ - lecturer-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-lecturer-service:${{ inputs.image_tag }} \ + lecturer-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-lecturer-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update course-service image run: | kubectl set image deployment/course-service \ - course-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-course-service:${{ inputs.image_tag }} \ + course-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-course-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Update enrollment-service image run: | kubectl set image deployment/enrollment-service \ - enrollment-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-enrollment-service:${{ inputs.image_tag }} \ + enrollment-service=${{ vars.ACR_LOGIN_SERVER }}/koalatech-enrollment-service:${{ github.event.workflow_run.head_sha }} \ -n production - name: Wait for frontend rollout diff --git a/frontend/src/pages/Login.jsx b/frontend/src/pages/Login.jsx index 1132741c..403c7975 100644 --- a/frontend/src/pages/Login.jsx +++ b/frontend/src/pages/Login.jsx @@ -100,7 +100,7 @@ const Login = () => { color="text.secondary" sx={{ mb: 3 }} > - Sign in to continue + Sign in to continue - Continuous Deployment {error && ( From dacf6dbc0ba7b949907ea064f3f5874e1c7e3f7b Mon Sep 17 00:00:00 2001 From: Sachin Date: Sat, 26 Sep 2026 14:31:36 +1000 Subject: [PATCH 3/3] Run CI on pull requests --- .github/workflows/01-ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/01-ci.yml b/.github/workflows/01-ci.yml index 8206db43..46a54f4e 100644 --- a/.github/workflows/01-ci.yml +++ b/.github/workflows/01-ci.yml @@ -1,12 +1,17 @@ name: 01 - CI on: - # Trigger the workflow on push to main branch + # Trigger CI when code is pushed to main push: branches: - main - - # Manual trigger for the workflow + + # Trigger CI for pull requests targeting main + pull_request: + branches: + - main + + # Manual trigger workflow_dispatch: