Skip to content

Commit

Permalink
Merge pull request #22 from SkywardAI/feat/makefile
Browse files Browse the repository at this point in the history
[feature] Add makefile
  • Loading branch information
Aisuko authored Mar 21, 2024
2 parents b736b3e + a5783a9 commit 9648c63
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: 'Backend CI/CD 🚀'
on:
push:
branches:
- 'feature/**'
- 'feat/**'
- 'fix/**'
- 'main'
tags:
- 'v*'
pull_request:
branches:
- 'feature/**'
Expand Down Expand Up @@ -169,8 +169,8 @@ jobs:
name: codecov-umbrella
verbose: true

docker_build:
name: 'Docker Build 🐳'
docker_operations:
name: 'Docker Build and Push🐳'
needs: [build, code-quality, test]
strategy:
matrix:
Expand Down Expand Up @@ -206,4 +206,5 @@ jobs:
- name: Push Docker image
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
run: |
docker build -t ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//} .
docker push ghcr.io/${{ secrets.DOCKER_REGISTRY }}/${{ secrets.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.PHONY: env
env:
@cp .env.example .env

.PHONY: build
build: env
docker-compose build

.PHONY: up
up: env build
docker-compose up -d
4 changes: 1 addition & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
db:
image: postgres:latest
Expand Down Expand Up @@ -129,7 +127,7 @@ services:
- "minio"

frontend:
image: ghcr.io/rebel:latest
image: ghcr.io/rebel:v0.0.4
container_name: frontend
restart: always
expose:
Expand Down

0 comments on commit 9648c63

Please sign in to comment.