Skip to content

add src files

add src files #7

Workflow file for this run

name: Docker Images CI/CD
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
REGISTRY: ghcr.io
API_IMAGE_TAG: ghcr.io/ahkim3/pantryprofiler-api:latest
UI_IMAGE_TAG: ghcr.io/ahkim3/pantryprofiler-ui:latest
jobs:
build-and-push-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker image for the API
run: |
docker build -t ${{ env.API_IMAGE_TAG }} ./backend
docker push ${{ env.API_IMAGE_TAG }}
env:
DB_CONFIG: ${{ secrets.DB_CONFIG }}
# - name: Build and push the Docker image for the UI
# uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
# with:
# context: ./frontend
# push: true
# tags: ${{ steps.meta-ui.outputs.tags }}
# labels: ${{ steps.meta-ui.outputs.labels }}