Skip to content

feat: add nginx container to redirect #10

feat: add nginx container to redirect

feat: add nginx container to redirect #10

Workflow file for this run

name: Build Docker Image
on:
push:
branches:
- main
paths:
- 'frontend/**'
- 'backend/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Check failure on line 15 in .github/workflows/build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build.yaml

Invalid workflow file

You have an error in your yaml syntax on line 15
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
path1:
- 'frontend/**'
path2:
- 'backend/**'
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push frontend
if: steps.filter.outputs.path1 == 'true'
uses: docker/build-push-action@v6
with:
build-args: |
NEXT_PUBLIC_API_BASE_URL=${{ secrets.NEXT_PUBLIC_API_BASE_URL }}
context: ./frontend
push: true
tags: |
z1yoon/nus-secondhand-market-frontend:${{ github.ref_name }}
z1yoon/nus-secondhand-market-frontend:${{ github.sha }}
- name: Build and push backend
if: steps.filter.outputs.path2 == 'true'
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
tags: |
z1yoon/nus-secondhand-market-backend:${{ github.ref_name }}
z1yoon/nus-secondhand-market-backend:${{ github.sha }}