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

Commit

Permalink
Feat adjust github pipeline for docker frontend artifacts
Browse files Browse the repository at this point in the history
This should allow to use docker building the frontend artifacts and
reusing them in the bare metal release.
  • Loading branch information
Toxix committed Jul 5, 2021
1 parent 7d3f635 commit adbef2e
Showing 1 changed file with 16 additions and 35 deletions.
51 changes: 16 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,35 +144,8 @@ jobs:
cd src/
coveralls --service=github
frontend:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
-
uses: actions/setup-node@v2
with:
node-version: '15'
-
name: Configure version on dev branches
if: startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev'
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
git_branch=${GITHUB_REF#refs/heads/}
sed -i -E "s/version: \"(.*)\"/version: \"${git_branch} ${git_hash}\"/g" src-ui/src/environments/environment.prod.ts
-
name: Build frontend
run: ./compile-frontend.sh
-
name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: frontend-compiled
path: src/documents/static/frontend/

build-release:
needs: [frontend, documentation, tests, whitespace, codestyle]
needs: [build-docker-image, documentation, tests, whitespace, codestyle]
runs-on: ubuntu-20.04
steps:
-
Expand All @@ -183,6 +156,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.7
-
uses: actions/setup-node@v2
with:
node-version: '15'
-
name: Install dependencies
run: |
Expand Down Expand Up @@ -282,7 +259,7 @@ jobs:
build-docker-image:
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-'))
runs-on: ubuntu-latest
needs: [frontend, tests, whitespace, codestyle]
needs: [tests, whitespace, codestyle]
steps:
-
name: Prepare
Expand All @@ -303,12 +280,6 @@ jobs:
-
name: Checkout
uses: actions/checkout@v2
-
name: Download frontend artifact
uses: actions/download-artifact@v2
with:
name: frontend-compiled
path: src/documents/static/frontend/
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down Expand Up @@ -344,3 +315,13 @@ jobs:
name: Inspect image
run: |
docker buildx imagetools inspect ${{ steps.prepare.outputs.inspect_tag }}
-
name: Export frontend artifact from docker
run: |
docker cp ${{ steps.prepare.outputs.tags }}:/src/src/documents/static/frontend/ src/documents/static/frontend/
-
name: Upload frontend artifact
uses: actions/upload-artifact@v2
with:
name: frontend-compiled
path: src/documents/static/frontend/

0 comments on commit adbef2e

Please sign in to comment.