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 4ae9622
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 29 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Backend

on: push

jobs:
backend-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: backend-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.

3 changes: 2 additions & 1 deletion backend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ docker-compose*
.git
.gitignore

*.md
*.md
*.mdx

0 comments on commit 4ae9622

Please sign in to comment.