Skip to content

Commit

Permalink
configured github actions for the django project
Browse files Browse the repository at this point in the history
  • Loading branch information
mercybassey committed Jul 9, 2023
1 parent 05de684 commit c47f0d9
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build-share.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Share Docker Image

on:
push:
branches:
- main

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

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build Docker image
run: docker build -t my-django-project .

- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push Docker image

run: docker push mercybassey/django
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.11

WORKDIR /app

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
Binary file modified django_project/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file modified django_project/__pycache__/settings.cpython-310.pyc
Binary file not shown.
Binary file modified django_project/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Binary file modified django_project/__pycache__/wsgi.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/admin.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/forms.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/models.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/urls.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/__pycache__/views.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/migrations/__pycache__/0001_initial.cpython-310.pyc
Binary file not shown.
Binary file modified todo_app/migrations/__pycache__/__init__.cpython-310.pyc
Binary file not shown.

0 comments on commit c47f0d9

Please sign in to comment.