Skip to content

Merge pull request #2 from MohamedHamed12/hamed #26

Merge pull request #2 from MohamedHamed12/hamed

Merge pull request #2 from MohamedHamed12/hamed #26

name: Build and Publish Images
on:
push:
branches: [main]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/#-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push Django app image
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile # Use separate Dockerfiles for each image
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/hospital:v1 # Customize image names
# build-args: DJANGO_SETTINGS_MODULE=${{ secrets.DJANGO_SETTINGS_MODULE }} # Inject secret environment variable