Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 4f5f6cb

Browse files
author
Toxix
committed
Feat adjust github pipeline for docker frontend artifacts
This should allow to use docker building the frontend artifacts and reusing them in the bare metal release.
1 parent 7d3f635 commit 4f5f6cb

File tree

1 file changed

+12
-35
lines changed

1 file changed

+12
-35
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -144,35 +144,8 @@ jobs:
144144
cd src/
145145
coveralls --service=github
146146
147-
frontend:
148-
runs-on: ubuntu-20.04
149-
steps:
150-
-
151-
name: Checkout
152-
uses: actions/checkout@v2
153-
-
154-
uses: actions/setup-node@v2
155-
with:
156-
node-version: '15'
157-
-
158-
name: Configure version on dev branches
159-
if: startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev'
160-
run: |
161-
git_hash=$(git rev-parse --short "$GITHUB_SHA")
162-
git_branch=${GITHUB_REF#refs/heads/}
163-
sed -i -E "s/version: \"(.*)\"/version: \"${git_branch} ${git_hash}\"/g" src-ui/src/environments/environment.prod.ts
164-
-
165-
name: Build frontend
166-
run: ./compile-frontend.sh
167-
-
168-
name: Upload artifact
169-
uses: actions/upload-artifact@v2
170-
with:
171-
name: frontend-compiled
172-
path: src/documents/static/frontend/
173-
174147
build-release:
175-
needs: [frontend, documentation, tests, whitespace, codestyle]
148+
needs: [build-docker-image, documentation, tests, whitespace, codestyle]
176149
runs-on: ubuntu-20.04
177150
steps:
178151
-
@@ -282,7 +255,7 @@ jobs:
282255
build-docker-image:
283256
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-'))
284257
runs-on: ubuntu-latest
285-
needs: [frontend, tests, whitespace, codestyle]
258+
needs: [tests, whitespace, codestyle]
286259
steps:
287260
-
288261
name: Prepare
@@ -303,12 +276,6 @@ jobs:
303276
-
304277
name: Checkout
305278
uses: actions/checkout@v2
306-
-
307-
name: Download frontend artifact
308-
uses: actions/download-artifact@v2
309-
with:
310-
name: frontend-compiled
311-
path: src/documents/static/frontend/
312279
-
313280
name: Set up Docker Buildx
314281
uses: docker/setup-buildx-action@v1
@@ -344,3 +311,13 @@ jobs:
344311
name: Inspect image
345312
run: |
346313
docker buildx imagetools inspect ${{ steps.prepare.outputs.inspect_tag }}
314+
-
315+
name: Export frontend artifact from docker
316+
run: |
317+
docker cp ${{ steps.prepare.outputs.tags }}:/src/src/documents/static/frontend/ src/documents/static/frontend/
318+
-
319+
name: Upload frontend artifact
320+
uses: actions/upload-artifact@v2
321+
with:
322+
name: frontend-compiled
323+
path: src/documents/static/frontend/

0 commit comments

Comments
 (0)