Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gh-actions): backend, frontend #8

Merged
merged 3 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

24 changes: 24 additions & 0 deletions .github/workflows/frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Frontend

on: push

jobs:
frontend-ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- uses: pnpm/action-setup@v3
with:
version: 8

- run: |
cd ./frontend
pnpm install
pnpm run lint
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# METRO NOW

[![Backend](https://github.com/krystxf/metro-now/actions/workflows/backend.yaml/badge.svg)](https://github.com/krystxf/metro-now/actions/workflows/backend.yaml)
[![Frontend](https://github.com/krystxf/metro-now/actions/workflows/frontend.yaml/badge.svg)](https://github.com/krystxf/metro-now/actions/workflows/frontend.yaml)

Soon on App store\
![Download_on_the_App Store](https://github.com/krystxf/metro-now/assets/48121710/4cafe145-eab2-4c79-9ef2-0fced1111b09)

Expand Down
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
Loading