Skip to content

Commit

Permalink
add gh workflow for docker build [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel ML authored and Michel ML committed Nov 12, 2024
1 parent 70ae2f2 commit 3813b28
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
4 changes: 3 additions & 1 deletion scripts/build_rdkitjs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

set -e

# Set branch to release
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3813b28

Please sign in to comment.