From d0b3bd80c2ca7cf9a71c58dd5923a12bd1e8a005 Mon Sep 17 00:00:00 2001 From: Frederick Pruneau Date: Thu, 5 Feb 2026 15:16:39 -0500 Subject: [PATCH] Added docker image building --- .gitea/workflows/node-ci.yaml | 57 ++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/node-ci.yaml b/.gitea/workflows/node-ci.yaml index ee66728..26e868e 100644 --- a/.gitea/workflows/node-ci.yaml +++ b/.gitea/workflows/node-ci.yaml @@ -68,4 +68,59 @@ jobs: with: webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}' jobStatus: ${{ job.status }} - title: Test failed \ No newline at end of file + title: Test failed + + build: + runs-on: ubuntu-24.04 + steps: + - name: Gitea Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - name: Setup Node.js + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run build + run: npm run build + + # Partage du build via artifact + - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: spa + path: dist/spa/ + retention-days: 1 + #Partage du dossier src + - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + name: src + path: src/ + retention-days: 1 + + - name: Notify Google Chat + if: ${{ failure() }} # Use always to ensure that the notification is also send on failure of former steps + uses: SimonScholz/google-chat-action@3b3519e5102dba8aa5046fd711c4b553586409bb # v1.1.0 + with: + webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}' + jobStatus: ${{ job.status }} + title: Test failed + + deploy: + needs: [lint, test, build] + runs-on: ubuntu-24.04 + if: github.ref == 'refs/heads/main' + permissions: + contents: read + id-token: write + steps: + - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + with: + name: spa + - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + with: + name: src + - run: docker build -t targo_frontend . \ No newline at end of file