Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
name: Python application

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
branches:
- main # or your desired branch

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build & Push Image
- name: Checkout repository
uses: actions/checkout@v5

- name: Log in to Azure Container Registry
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.AZURE_REGISTRY_URL }}
username: ${{ secrets.AZURE_REGISTRY_USERNAME }}
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

- name: Build and push Docker image
run: |
echo "${{ secrets.DOCKERPW }}" | docker login -u "dab8106" --password-stdin
docker image build -t dab8106/pyflask:latest .
docker push dab8106/pyflask:latest
docker build -t ${{ secrets.AZURE_REGISTRY_URL }}/fahad:${{ github.sha }} .
docker push ${{ secrets.AZURE_REGISTRY_URL }}/fahad:${{ github.sha }}
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,5 @@ RUN pip install -r requirements.txt

COPY . .

LABEL maintainer="WebMagic Informatica <info@webmagicinformatica.com>" \
version="1.0"

CMD flask run --host=0.0.0.0 --port=5000