Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Feat adjust github pipeline for docker frontend artifacts

Toxix84f96d7a984b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 13dc2c74c..2d452f3bf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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: '16'
- -
- 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:
-
@@ -283,7 +256,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
@@ -304,12 +277,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
@@ -346,3 +313,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/