46bf8705d6
- Added GitHub Actions workflow for building Docker images (.github/workflows/docker-image.yml) - Created Dockerfile for containerizing the application - Implemented main application logic in app.py - Added requirements.txt for managing Python dependencies
27 lines
584 B
YAML
27 lines
584 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: your-dockerhub-username/random-pdf:latest
|