Skip to content

split into two packages #121

split into two packages

split into two packages #121

Workflow file for this run

name: Docker CI/CD
on:
push:
branches: [ "dev" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-backend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker build --pull -t ${{ env.REGISTRY }}/${{ github.repository }}-backend:latest -f backend.Dockerfile .
docker push ${{ env.REGISTRY }}/${{ github.repository }}-backend:latest
build-frontend:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
run: |
docker build --pull -t ${{ env.REGISTRY }}/${{ github.repository }}-frontend:latest -f frontend.Dockerfile .
docker push ${{ env.REGISTRY }}/${{ github.repository }}-frontend:latest