Skip to content

Commit

Permalink
chore(gh-actions): backend
Browse files Browse the repository at this point in the history
  • Loading branch information
krystxf committed Apr 21, 2024
1 parent a84bac5 commit fede48c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 28 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Backend
on:
push:
paths:
- "backend/**"
paths-ignore:
- "**/*.md"
- "**/*.mdx"
- "**/**.example.*"

jobs:
ci:
name: CI
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
bun install
bun run build
publish-docker-image:
needs: ci
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
push: true
tags: krystxf/metro-now-backend:latest
28 changes: 0 additions & 28 deletions .github/workflows/ci.yaml

This file was deleted.

0 comments on commit fede48c

Please sign in to comment.