Added docker image building
This commit is contained in:
parent
019bc255a9
commit
d0b3bd80c2
|
|
@ -68,4 +68,59 @@ jobs:
|
||||||
with:
|
with:
|
||||||
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}'
|
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK }}'
|
||||||
jobStatus: ${{ job.status }}
|
jobStatus: ${{ job.status }}
|
||||||
title: Test failed
|
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 .
|
||||||
Loading…
Reference in New Issue
Block a user