diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ecb58a975..a9ca2c696 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,11 +1,9 @@ name: Release on: - release: - types: [created] + workflow_dispatch: + push: branches: - - main - paths-ignore: - - documentation/** + - feat/docker jobs: build: name: Test & Build & Upload artifact @@ -47,4 +45,13 @@ jobs: push: true file: Dockerfile tags: inseefr/bauhaus:${{ env.VERSION }} - + - name: Build and push + uses: docker/build-push-action@v4 + run: echo "VERSION=$(cat package.json | jq -r .version)" >> $GITHUB_ENV + with: + push: true + file: Dockerfile + tags: inseefr/bauhaus-ssm:${{ env.VERSION }} + build-args: | + VITE_CONCEPTS_DOCUMENTATION=http://google.fr + VITE_OPERATIONS_DOCUMENTATION=https://emmanueldemey.dev diff --git a/Dockerfile b/Dockerfile index ce2b170c5..0d7c7f851 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,15 @@ # Étape de construction FROM node:latest as builder +ARG VITE_CONCEPTS_DOCUMENTATION +ARG VITE_OPERATIONS_DOCUMENTATION + +ENV VITE_CONCEPTS_DOCUMENTATION=$VITE_CONCEPTS_DOCUMENTATION +ENV VITE_OPERATIONS_DOCUMENTATION=$VITE_OPERATIONS_DOCUMENTATION + +RUN echo $VITE_CONCEPTS_DOCUMENTATION +RUN echo $VITE_OPERATIONS_DOCUMENTATION + WORKDIR /bauhaus COPY ./ ./