Skip to content

Commit

Permalink
docker workflow created
Browse files Browse the repository at this point in the history
  • Loading branch information
itzzjb committed Aug 8, 2024
1 parent d195f03 commit f2090c0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Pipeline to build and push Docker image to Docker Hub when there are changes in the main branch
# Going to use actions from -> https://github.com/marketplace?query=docker
name: Docker Build and Push Docker Image
run-name: Build and Push Docker Image
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
docker:
name: Build and Push Docker Image
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout
uses: actions/checkout@v4
# Login to Docker Hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKER_USERNAME}} # Docker Hub username
password: ${{secrets.DOCKER_PASSWORD}} # Docker Hub password
# Build the Docker image
- name: Build anf Push Docker Image
uses: docker/build-push-action@v6
with:
push: true
tags: itzzjb/docker-react:latest

0 comments on commit f2090c0

Please sign in to comment.