Skip to content

Commit

Permalink
Merge pull request #16 from p2m2/develop
Browse files Browse the repository at this point in the history
pass to 1.1.0
  • Loading branch information
Marcellino-Palerme authored Dec 5, 2024
2 parents 654deca + 244b4a2 commit 2e3eac4
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# © 2024 INRAE
# SPDX-FileContributor: Marcellino Palerme <[email protected]>
#
# SPDX-License-Identifier: MIT

name: publish

on:
pull_request:
branches: 'main'

permissions:
contents: write
pull-requests: write
checks: write

jobs:
publish:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v4
name: Checkout repository

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.MY_TOKEN }}

- name: set lower case owner name
id: set_owner_lc
env:
OWNER: '${{ github.repository_owner }}'
run: |
echo "OWNER_LC=${OWNER,,}" >> "$GITHUB_OUTPUT"
- name: Build Docker image
env:
OWNER: ${{ steps.set_owner_lc.outputs.OWNER_LC }}
run: |
docker build -f DockerfileQuay -t ghcr.io/${{ env.OWNER }}/service-p2m2tools-api:latest -t ghcr.io/${{ env.OWNER }}/service-p2m2tools-api:1.1.0 --build-arg TEAM=${{ env.OWNER }} .
- name: Push Docker image
env:
OWNER: ${{ steps.set_owner_lc.outputs.OWNER_LC }}
run: |
docker push -a ghcr.io/${{ env.OWNER }}/service-p2m2tools-api
24 changes: 24 additions & 0 deletions DockerfileQuay
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# © 2024 INRAE
# SPDX-FileContributor: Marcellino Palerme <[email protected]>
#
# SPDX-License-Identifier: MIT

ARG TEAM

FROM ghcr.io/${TEAM}/scala-sbt:latest

LABEL author="Olivier Filangi"
LABEL maintainer="Marcellino Palerme <[email protected]>"
LABEL mail="[email protected]"
ENV MILL_VERSION="0.11.2"

EXPOSE 8080

COPY . /service-p2m2tools-api/
WORKDIR /service-p2m2tools-api/
RUN curl -L https://github.com/com-lihaoyi/mill/releases/download/${MILL_VERSION}/${MILL_VERSION} > mill &&\
chmod +x mill &&\
./mill app.test &&\
./mill app.assembly

CMD ["java","-jar","./out/app/assembly.dest/out.jar"]
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ API Service to parse the formats of the metabolomics data acquisition devices of

## prerequisites

```
``` bash
curl -L https://github.com/com-lihaoyi/mill/releases/download/0.11.2/0.11.2 > mill && chmod +x mill
```

## run tests

```bash
Expand All @@ -36,6 +37,15 @@ docker pull inraep2m2/service-p2m2tools-api:latest
docker run -d -p 8080:8080 -t inraep2m2/service-p2m2tools-api:latest
```

OR

```bash
docker pull ghcr.io/<repository-user>/service-p2m2tools-api:latest
docker run -d -p 8080:8080 -t ghcr.io/<repository-user>/service-p2m2tools-api:latest
```

Replace `<repository-user>` with your github username

### jar

```bash
Expand All @@ -45,7 +55,8 @@ java -jar ./out/app/assembly.dest/out.jar

### mill

or with mill
or with mill

```bash
./mill -w app.runBackground
```
Expand All @@ -66,6 +77,7 @@ ID# Name Type ISTD Group# Mass Ret.Time Start Time End Time A/H Area Height Conc
1 Glyoxylate (1MEOX) (1TMS )m0 Target 1 160.00 6.405 6.393 6.423 1.080 14 13 0.00029 Auto 3 6.400 Default 0 0 0 0 0 0 84.50 0.00 0.00 18 73.00 0 0 84.50 0.00 59.00 142 129 49.59 1014.29 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1218 4.87 mg/L 0.00000
'
```

### With file

```bash
Expand Down Expand Up @@ -104,8 +116,8 @@ var fs = require('fs');

## devel / memo


### setting up IntelliJ IDEA

```bash
./mill -j 0 mill.idea.GenIdea/idea
```

0 comments on commit 2e3eac4

Please sign in to comment.