Skip to content

Commit

Permalink
Merge pull request #3 from Inist-CNRS/build/automatic-docker-image-build
Browse files Browse the repository at this point in the history
Add automatic docker image build
  • Loading branch information
parmentf authored Feb 8, 2024
2 parents fd0f10b + a8b121e commit b26bbea
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4

[*.yml]
indent_size = 2
tab_width = 2
24 changes: 24 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Build and Push'

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout from Git
uses: actions/checkout@v4

- name: Docker Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker Image
run: docker build --no-cache -t cnrsinist/tdm-factory:${{ github.ref_name }} .

- name: Push Docker Image
run: docker push cnrsinist/tdm-factory:${{ github.ref_name }}
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
install:
cd tdm-be && \
npm install && \
cd ../tdm-fe && \
npm install && \
cd ..
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ Build the Docker image using the provided Dockerfile:
docker build . -t tdm:v1.0.0 --no-cache
```

### Publishing a new version

To create a new version of TDM-Factory create a new
[GitHub release](https://github.com/Inist-CNRS/tdm-factory/releases/new) with an associated tags.
This will run the ci and push an image into Docker Hub.

## Usage

To run the application in a Docker container:
Expand Down

0 comments on commit b26bbea

Please sign in to comment.