Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Add Git Action To Build and Push Ocular Backend To DockerHub !! #3

Add Git Action To Build and Push Ocular Backend To DockerHub !!

Add Git Action To Build and Push Ocular Backend To DockerHub !! #3

name: Build and Push Ocular Backend Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REGISTRY_NAME: ocular/ocular
jobs:
push_to_docker_registry:
name: Push Ocular Backend To Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check Out Branch
uses: actions/checkout@v4
- name: Log In To Docker
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKER_USERNAME}}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set Up Docker Builders
uses: docker/setup-buildx-action@v3
- name: Build and Push Ocular Backend Image
uses: docker/build-push-action@v6
with:
context: ./
file: ./packages/ocular/Dockerfile.local
push: true
tags: |
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
${{ env.REGISTRY_IMAGE }}:latest