Skip to content

feat(be): v2 init

feat(be): v2 init #32

Workflow file for this run

name: Backend CI
on: push
jobs:
build-v1:
name: Build v1 πŸ—οΈ
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: |
cd ./backend/v1
bun install
bun run build
build-v2:
name: Build v2 πŸ—οΈ
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [20, 22]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: pnpm/action-setup@v3
with:
version: 8
- run: |
cd ./backend/v2
pnpm install
pnpm run build
publish-v1-docker-image:
name: Publish Docker image πŸš€
needs: build-v1
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
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: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and publish
uses: docker/build-push-action@v5
with:
context: ./backend/v1
push: true
tags: krystxf/metro-now-backend:v1-latest