From b791eabb82b2c90c10d8be2fcd71344aeea9d4bb Mon Sep 17 00:00:00 2001 From: MathieuAudibert Date: Wed, 11 Feb 2026 15:16:39 +0100 Subject: [PATCH 1/2] fix: cant deploy on azure k8s since i'm banned --- .github/workflows/promote.yml | 78 +++++++++++++++++------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 822d06c..9c89c16 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -25,49 +25,49 @@ jobs: docker build -t ghcr.io/mathieuaudibert/conteneurisation-orchestration:latest . docker push ghcr.io/mathieuaudibert/conteneurisation-orchestration:latest - deploy-to-k8s: - runs-on: ubuntu-latest - needs: [publish-images] - steps: - - name: Checkout code - uses: actions/checkout@v4 + #deploy-to-k8s: + #runs-on: ubuntu-latest + #needs: [publish-images] + #steps: + #- name: Checkout code + # uses: actions/checkout@v4 - - name: Configure kubectl - uses: azure/k8s-set-context@v3 - with: - method: kubeconfig - kubeconfig: ${{ secrets.KUBECONFIG }} + #- name: Configure kubectl + # uses: azure/k8s-set-context@v3 + # with: + # method: kubeconfig + # kubeconfig: ${{ secrets.KUBECONFIG }} - - name: Create secrets from environment - run: | - kubectl create secret generic mongodb-secret \ - --from-literal=username=${{ secrets.MONGO_ADM_USER }} \ - --from-literal=password=${{ secrets.MONGO_ADM_PASSWD }} \ - --from-literal=admin-uri=${{ secrets.ADM_MONGO_URI }} \ - --dry-run=client -o yaml | kubectl apply -f - + #- name: Create secrets from environment + # run: | + # kubectl create secret generic mongodb-secret \ + # --from-literal=username=${{ secrets.MONGO_ADM_USER }} \ + # --from-literal=password=${{ secrets.MONGO_ADM_PASSWD }} \ + # --from-literal=admin-uri=${{ secrets.ADM_MONGO_URI }} \ + # --dry-run=client -o yaml | kubectl apply -f - - - name: Deploy MongoDB - run: kubectl apply -f k8s/mongoDB.yml + #- name: Deploy MongoDB + # run: kubectl apply -f k8s/mongoDB.yml - - name: Deploy Backend - run: | - kubectl apply -f k8s/backend.yml - kubectl rollout restart deployment/backend - kubectl rollout status deployment/backend --timeout=5m + #- name: Deploy Backend + # run: | + # kubectl apply -f k8s/backend.yml + # kubectl rollout restart deployment/backend + # kubectl rollout status deployment/backend --timeout=5m - - name: Deploy Frontend - run: | - kubectl apply -f k8s/frontend.yml - kubectl rollout restart deployment/frontend - kubectl rollout status deployment/frontend --timeout=5m + #- name: Deploy Frontend + # run: | + # kubectl apply -f k8s/frontend.yml + # kubectl rollout restart deployment/frontend + # kubectl rollout status deployment/frontend --timeout=5m - - name: Deploy Documentation - run: | - kubectl apply -f k8s/documentation.yml - kubectl rollout restart deployment/documentation - kubectl rollout status deployment/documentation --timeout=5m + #- name: Deploy Documentation + # run: | + # kubectl apply -f k8s/documentation.yml + # kubectl rollout restart deployment/documentation + # kubectl rollout status deployment/documentation --timeout=5m - - name: Verify deployment - run: | - kubectl get pods - kubectl get services \ No newline at end of file + #- name: Verify deployment + # run: | + # kubectl get pods + # kubectl get services \ No newline at end of file From 2494157d73051bd649313e3b2d013efc5cb7e7b9 Mon Sep 17 00:00:00 2001 From: MathieuAudibert Date: Wed, 11 Feb 2026 15:24:23 +0100 Subject: [PATCH 2/2] feat: add mr stage --- .github/workflows/main_pipeline.yml | 9 +++++++++ .github/workflows/mr.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/workflows/mr.yml diff --git a/.github/workflows/main_pipeline.yml b/.github/workflows/main_pipeline.yml index 0090ff5..53ae637 100644 --- a/.github/workflows/main_pipeline.yml +++ b/.github/workflows/main_pipeline.yml @@ -7,6 +7,15 @@ on: branches: ["main", "develop", "feature/**"] jobs: + copilot-review: + if: github.event_name == 'pull_request' + uses: ./.github/workflows/mr.yml + permissions: + contents: read + pull-requests: write + issues: write + secrets: inherit + build-task: uses: ./.github/workflows/build.yml secrets: inherit diff --git a/.github/workflows/mr.yml b/.github/workflows/mr.yml new file mode 100644 index 0000000..0c95d35 --- /dev/null +++ b/.github/workflows/mr.yml @@ -0,0 +1,26 @@ +name: call copilot on merge requests + +on: + workflow_call: + +jobs: + copilot-review: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + issues: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: GitHub Copilot Code Review + uses: github/copilot-codereviewer@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + review-level: 'detailed' + include-files: '**/*.py,**/*.js,**/*.ts,**/*.jsx,**/*.tsx,**/*.yml,**/*.yaml,**/*.json,**/*.md' + exclude-files: '**/node_modules/**,**/dist/**,**/__pycache__/**,**/build/**' + enable-suggestions: true \ No newline at end of file