Skip to content

Merge branch 'dev' of https://github.com/rohanbatrain/second_brain_da… #7

Merge branch 'dev' of https://github.com/rohanbatrain/second_brain_da…

Merge branch 'dev' of https://github.com/rohanbatrain/second_brain_da… #7

Workflow file for this run

name: Build and Push Docker Dev Image to GHCR
# Trigger the action when pushing to the main branch
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code from the repository
- name: Checkout code
uses: actions/checkout@v2
# Set up Docker Buildx (needed for building Docker images in GitHub Actions)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Login to Docker Hub before building and pushing (good practice)
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: rohanbatra
password: ${{ secrets.DOCKER_HUB_TOKEN }}
# Build and push Docker image to Docker Hub
- name: Build and Push Docker image (Docker Hub)
run: |
docker build -t rohanbatra/second_brain_database:dev .
docker push rohanbatra/second_brain_database:dev
- name: Publish to Github Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: rohanbatrain/second_brain_database/dev
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io