Skip to content

Update Main-CI.yml

Update Main-CI.yml #4

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- "main"
jobs:
Build-and-Push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t students_registration_system:V3.0 .
- name: Push Docker image
run: |
docker tag students_registration_system:V3.0 ${{secrets.DOCKERHUB_USERNAME}}/students_registration_system:V3.0
docker push ${{secrets.DOCKERHUB_USERNAME}}/students_registration_system:V3.0