mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #92 from IT4Change/docker-rework
fix(docker): docker rework
This commit is contained in:
commit
8ade071ab7
3
.github/file-filters.yml
vendored
3
.github/file-filters.yml
vendored
@ -9,6 +9,9 @@ frontend-test-unit-code: &frontend-test-unit-code
|
||||
frontend-test-build-code: &frontend-test-build-code
|
||||
- '**/*'
|
||||
|
||||
frontend-test-build-docker: &frontend-test-build-docker
|
||||
- '**/*'
|
||||
|
||||
frontend-test-build-docs: &frontend-test-build-docs
|
||||
- '**/*.md'
|
||||
- '.vuepress/*'
|
||||
|
||||
46
.github/workflows/frontend.test.build.docker.yml
vendored
Normal file
46
.github/workflows/frontend.test.build.docker.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
name: "frontend:test:build test docker"
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
# only (but most important) job from this workflow required for pull requests
|
||||
# check results serve as run conditions for all other jobs here
|
||||
files-changed:
|
||||
name: Detect File Changes - frontend-test-build-docker
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changes: ${{ steps.changes.outputs.frontend-test-build-docker }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Check for frontend file changes
|
||||
uses: dorny/paths-filter@v3.0.1
|
||||
id: changes
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
filters: .github/file-filters.yml
|
||||
list-files: shell
|
||||
|
||||
build-production:
|
||||
if: needs.files-changed.outputs.changes == 'true'
|
||||
name: Build Docker Production - Frontend
|
||||
needs: files-changed
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Frontend | Build Docker Production
|
||||
run: docker compose -f docker-compose.yml build
|
||||
|
||||
build-development:
|
||||
if: needs.files-changed.outputs.changes == 'true'
|
||||
name: Build Docker Development - Frontend
|
||||
needs: files-changed
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Frontend | Build Docker Development
|
||||
run: docker compose build
|
||||
@ -86,7 +86,7 @@ FROM base as build
|
||||
# Copy everything
|
||||
COPY . .
|
||||
# npm install
|
||||
RUN npm install --frozen-lockfile --non-interactive
|
||||
RUN npm install --include=dev --frozen-lockfile --non-interactive
|
||||
# npm build
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user