From 3813b284022b7bf3381ff2753a28bd6937844250 Mon Sep 17 00:00:00 2001 From: Michel ML Date: Tue, 12 Nov 2024 09:54:15 -0500 Subject: [PATCH] add gh workflow for docker build [skip ci] --- .github/workflows/docker-build.yml | 28 ++++++++++++++++++++++++++++ Dockerfile | 2 +- scripts/build_rdkitjs.sh | 4 +++- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 00000000..4444f36c --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,28 @@ +name: Docker Build + +on: + workflow_dispatch: + inputs: + semver_version: + description: 'Semantic version (e.g. 1.0.0)' + required: true + type: string + rdkit_dash_version: + description: 'RDKit Dash version' + required: true + type: string + beta: + description: 'Beta flag' + required: true + type: string + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Build with NPM + run: | + RDKIT_DASH_VERSION=${{ inputs.rdkit_dash_version }} SEMVER_VERSION=${{ inputs.semver_version }} BETA=${{ inputs.beta }} NPM_TOKEN=${{ secrets.NPM_TOKEN }} npm run build \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 777e5286..b4411718 100644 --- a/Dockerfile +++ b/Dockerfile @@ -116,4 +116,4 @@ RUN /opt/emsdk/node/*/bin/node tests.js # https://docs.docker.com/engine/reference/commandline/build/#custom-build-outputs FROM scratch as export-stage COPY --from=build-stage /src/rdkit/Code/MinimalLib/demo / -COPY --from=build-stage /src/rdkit/Code/MinimalLib/docs / +COPY --from=build-stage /src/rdkit/Code/MinimalLib/docs / \ No newline at end of file diff --git a/scripts/build_rdkitjs.sh b/scripts/build_rdkitjs.sh index 021e3d34..98fb1d7a 100644 --- a/scripts/build_rdkitjs.sh +++ b/scripts/build_rdkitjs.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -e # Set branch to release @@ -28,7 +30,7 @@ rm -rf $LEGACY_MINIMALLIB_OUTPUT_PATH mkdir -p $LEGACY_MINIMALLIB_OUTPUT_PATH # Build distribution files -DOCKER_BUILDKIT=1 docker build --no-cache --platform=linux/amd64 -f Dockerfile --build-arg RDKIT_BRANCH=$RDKIT_BRANCH -o $MINIMALLIB_OUTPUT_PATH . +DOCKER_BUILDKIT=1 docker build --platform=linux/amd64 -f Dockerfile --build-arg RDKIT_BRANCH=$RDKIT_BRANCH -o $MINIMALLIB_OUTPUT_PATH . # Make dist files executable chmod a+rwx $MINIMALLIB_OUTPUT_PATH/RDKit_minimal.js