Skip to content

Update README.md

Update README.md #13

Workflow file for this run

name: Build and Push to GHCR
on:
push:
branches: [ "main" ]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- name: backend
context: ./backend
dockerfile: ./backend/Dockerfile
image: ghcr.io/${{ github.repository_owner }}/trishul-snmp-backend
- name: frontend
context: ./frontend
dockerfile: ./frontend/Dockerfile
image: ghcr.io/${{ github.repository_owner }}/trishul-snmp-frontend
steps:
- uses: actions/checkout@v4
- name: Load .env into environment
run: |
grep -vE '^\s*#' .env | grep -vE '^\s*$' >> "$GITHUB_ENV"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push ${{ matrix.name }} image
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: |
${{ matrix.image }}:latest
${{ matrix.image }}:${{ env.APP_VERSION }}