Skip to content

Commit

Permalink
add build docker image in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
emp7yhead committed Jun 20, 2023
1 parent 94cd22a commit a4600f1
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 2 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run checks
name: Check and Build

on:
- push
Expand Down Expand Up @@ -61,3 +61,24 @@ jobs:
with:
file: ./coverage.xml
fail_ci_if_error: true

build:
needs: test_and_lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/bibliograph:latest
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![codecov](https://codecov.io/gh/emp7yhead/bibliograph/branch/main/graph/badge.svg?token=uV2RgGcNwq)](https://codecov.io/gh/emp7yhead/bibliograph)
[![Maintainability](https://api.codeclimate.com/v1/badges/c77cfa99ba81ed1d3c33/maintainability)](https://codeclimate.com/github/emp7yhead/bibliograph/maintainability)
[![Run checks](https://github.com/emp7yhead/bibliograph/actions/workflows/CI.yml/badge.svg)](https://github.com/emp7yhead/bibliograph/actions/workflows/CI.yml)
[![Check and Build](https://github.com/emp7yhead/bibliograph/actions/workflows/CI.yml/badge.svg)](https://github.com/emp7yhead/bibliograph/actions/workflows/CI.yml)
![Docker Image Size (tag)](https://img.shields.io/docker/image-size/emptyhead/bibliograph/47122f2)

App for organizing book collection.

Expand Down Expand Up @@ -56,3 +57,27 @@ App for organizing book collection.
```
- Go to 0.0.0.0:5000
### Docker
You always can use docker image for:
- installation
```bash
docker pull emptyhead/bibliograph --platform linux/x86_64
```
- applying migration
```bash
docker run -ti -p 5000:5000 emptyhead/bibliograph make migrate
```
- run app
```bash
docker run -ti -p 5000:5000 emptyhead/bibliograph
```
But don't forget about environment variables when using docker.

0 comments on commit a4600f1

Please sign in to comment.