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
53 changes: 53 additions & 0 deletions .github/workflows/image_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Push Docker Image

on:
push:
branches: ["main"]
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
run: echo "Checking out repository..."

- uses: actions/checkout@v4

- name: Checkout completed
run: echo "Repository checked out."

- name: Docker login start
run: echo "Logging in to Docker Hub as ${{ secrets.USERNAME }}"

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}

- name: Docker login success
run: echo "Docker Hub login successful."

- name: Setup Buildx start
run: echo "Setting up Docker Buildx..."

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Buildx ready
run: echo "Docker Buildx is ready."

- name: Build & push start
run: echo "Building and pushing Docker image..."

- name: Build and Push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ secrets.USERNAME }}/final-python:latest

- name: Build & push finished
run: echo "Docker image pushed successfully"
20 changes: 0 additions & 20 deletions .github/workflows/main.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/python-ci.yml

This file was deleted.

15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.7-slim

WORKDIR /app

RUN pip install pipenv

COPY Pipfile Pipfile.lock ./

RUN pipenv install --system

COPY . .

EXPOSE 5000

CMD ["python", "app.py"]