From deadd87a112f08a7be29981602ad818015a95030 Mon Sep 17 00:00:00 2001 From: Issam Date: Thu, 5 Dec 2024 19:35:20 -0500 Subject: [PATCH] feat: CLIN-3559 Added some gh actions --- .github/workflows/commit_lint.yml | 15 +++++++++++++++ .github/workflows/publish_image_sha.yml | 20 ++++++++++++++++++++ Dockerfile | 13 ++++++++++--- 3 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/commit_lint.yml create mode 100644 .github/workflows/publish_image_sha.yml diff --git a/.github/workflows/commit_lint.yml b/.github/workflows/commit_lint.yml new file mode 100644 index 0000000..e8c997b --- /dev/null +++ b/.github/workflows/commit_lint.yml @@ -0,0 +1,15 @@ +name: Commit Lint Check + +on: [push] + +jobs: + build: + name: Commit Lint Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: true + - name: Lint Commits + uses: Ferlab-Ste-Justine/action-commit-lint@v2 diff --git a/.github/workflows/publish_image_sha.yml b/.github/workflows/publish_image_sha.yml new file mode 100644 index 0000000..89a4321 --- /dev/null +++ b/.github/workflows/publish_image_sha.yml @@ -0,0 +1,20 @@ +name: Publish Image Using Commit Hash + +on: + push: + branches: + - main + +jobs: + publish_qa: + name: Publish QA Image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Push the image on the docker registry + uses: Ferlab-Ste-Justine/action-push-image@v2 + with: + username: ${{ secrets.FERLAB_DOCKER_HUB_USER }} + password: ${{ secrets.FERLAB_DOCKER_HUB_TOKEN }} + image: ferlabcrsj/clin-docs + tag_format: "qa-{sha}-{timestamp}" diff --git a/Dockerfile b/Dockerfile index ccaa2e3..8bdd9a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,13 @@ -FROM node:latest +# Utilisation d'une image Node.js stable (éviter "latest" en production) +FROM node:18-alpine LABEL description="QLIN Documentation." + WORKDIR /docs + RUN npm install -g docsify-cli@latest -EXPOSE 3000/tcp -ENTRYPOINT docsify serve . \ No newline at end of file + +COPY ./docs /docs + +EXPOSE 3000 + +ENTRYPOINT ["docsify", "serve", "."] \ No newline at end of file