From 170ea0cf4ff925fe031c4ed8a71e089fc4670513 Mon Sep 17 00:00:00 2001 From: Malak Elbanna <67643605+malak-elbanna@users.noreply.github.com> Date: Fri, 12 Jan 2024 15:39:14 +0200 Subject: [PATCH] Update azure-container-webapp.yml --- .github/workflows/azure-container-webapp.yml | 22 ++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/azure-container-webapp.yml b/.github/workflows/azure-container-webapp.yml index 7842dbf..63850f1 100644 --- a/.github/workflows/azure-container-webapp.yml +++ b/.github/workflows/azure-container-webapp.yml @@ -1,37 +1,33 @@ name: CI Pipeline + on: push: branches: [main] + jobs: build-and-push: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: '16' + - name: Checkout code + uses: actions/checkout@v2 - - name: Set up python + - name: Set up Python uses: actions/setup-python@v2 with: python-version: '3.12' - name: Install Dependencies - run: - npm install + run: | pip install -r requirements.txt - name: Run tests with pytest - run: - npm test + run: | pip install pytest pytest - - name: Build and push docker image - run: + - name: Build and push Docker image + run: | docker build -t ${{secrets.LOGIN_SERVER}}/flask-app:latest . docker login ${{secrets.LOGIN_SERVER}} -u ${{secrets.AZURE_USERNAME}} -p ${{secrets.AZURE_PASSWORD}} docker push ${{secrets.LOGIN_SERVER}}/flask-app:latest