Skip to content

Commit be63c41

Browse files
authored
Merge pull request #14 from broadinstitute/fix-bundling
Added bundling of js code before building docker image
2 parents 6b7c3df + 0fd9e61 commit be63c41

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

.github/workflows/build-docker.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Build Taiga image
22

3-
on:
4-
push:
5-
branches: main
3+
on: push
64

75
env:
86
IMAGE_TAG: us.gcr.io/cds-docker-containers/taiga:ga-build-${{ github.run_number }}
@@ -18,6 +16,8 @@ jobs:
1816
- uses: actions/checkout@v2
1917
- name: write SHA to file
2018
run: "bash write_version.sh ${{ github.sha }}"
19+
- name: bundle JS
20+
run: "bash bundle_js.sh"
2121
- name: Login to GCR
2222
uses: docker/login-action@v2
2323
with:
@@ -31,6 +31,8 @@ jobs:
3131
- name: Push Docker image
3232
run: docker push ${{ env.IMAGE_TAG }}
3333
- name: Tag as latest
34+
if: github.ref == 'refs/heads/main'
3435
run: docker tag ${{ env.IMAGE_TAG }} ${{ env.FINAL_IMAGE_TAG }}
3536
- name: Push Docker image
37+
if: github.ref == 'refs/heads/main'
3638
run: docker push ${{ env.FINAL_IMAGE_TAG }}

bundle_js.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set -ex
2+
cd react_frontend
3+
yarn install
4+
./node_modules/.bin/webpack --mode=production

install_prereqs.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
set -ex
2-
pip install -r dev-requirements.txt
3-
python setup.py develop
42
pre-commit install
3+
poetry install
54
yarn install --cwd react_frontend

0 commit comments

Comments
 (0)