Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Docker Image

on:
workflow_dispatch:
push:
paths:
- 'requirements.txt'

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

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build the Docker image
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/test-workflows .

- name: Push the Docker image
run: docker push ${{ secrets.DOCKER_USERNAME }}/test-workflows:latest
12 changes: 12 additions & 0 deletions DockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ubuntu:latest as base

RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --upgrade pip

COPY requirements.txt /app/requirements.txt

RUN pip3 install -r /app/requirements.txt