diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fe37236..878bd1b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,43 @@ on: - master jobs: + ############################################################################## + # JOB: DOCKER BUILD COMMUNITY NEO4J ########################################## + ############################################################################## + build_production_neo4j: + name: Docker Build Branded - Neo4j Community + runs-on: ubuntu-latest + #needs: [nothing] + steps: + ########################################################################## + # CHECKOUT CODE ########################################################## + ########################################################################## + - name: Checkout code + uses: actions/checkout@v2 + ########################################################################## + # SET ENVS ############################################################### + ########################################################################## + - name: ENV - VERSION + run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV + - name: ENV - BUILD_DATE + run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV + - name: ENV - BUILD_VERSION + run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV + - name: ENV - BUILD_COMMIT + run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV + ########################################################################## + # BUILD NEO4J DOCKER IMAGE (community-branded) ########################### + ########################################################################## + - name: Neo4j | Build `community-branded` image + run: | + docker build --target community-branded -t "ocelotsocialnetwork/neo4j-community-branded:latest" -t "ocelotsocialnetwork/neo4j-community-branded:${VERSION}" -t "ocelotsocialnetwork/neo4j-community-branded:${BUILD_VERSION}" -f docker/neo4j.Dockerfile . + docker save "ocelotsocialnetwork/neo4j-community-branded" > /tmp/neo4j-community-branded.tar + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: docker-neo4j-community-branded + path: /tmp/neo4j-community-branded.tar + ############################################################################## # JOB: DOCKER BUILD BRANDED BACKEND ########################################## ############################################################################## @@ -27,7 +64,7 @@ jobs: - name: ENV - BUILD_DATE run: echo "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV - name: ENV - BUILD_VERSION - run: echo "BUILD_VERSION=${VERSION}.${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV + run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV - name: ENV - BUILD_COMMIT run: echo "BUILD_COMMIT=${GITHUB_SHA}" >> $GITHUB_ENV ########################################################################## diff --git a/docker/neo4j.Dockerfile b/docker/neo4j.Dockerfile new file mode 100644 index 0000000..f303154 --- /dev/null +++ b/docker/neo4j.Dockerfile @@ -0,0 +1,9 @@ +################################################################################## +# COMMUNITY ###################################################################### +################################################################################## +FROM ocelotsocialnetwork/neo4j:latest as community-branded + +################################################################################## +# ENTERPRISE ##################################################################### +################################################################################## +FROM ocelotsocialnetwork/neo4j-enterprise:latest as enterprise-branded