diff --git a/.ci.sh b/.ci.sh index 1ad583b..0a39899 100644 --- a/.ci.sh +++ b/.ci.sh @@ -101,7 +101,7 @@ if [ "$SSHWIFTY_DEPLOY" = 'yes' ]; then ' docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" && docker buildx create --use --driver docker-container --name buildx-instance && - docker buildx build --tag "$SSHWIFTY_DOCKER_IMAGE_PUSH_TAG" --tag "$SSHWIFTY_DOCKER_IMAGE_PUSH_TAG_LATEST" --platform "$DOCKER_BUILD_TARGETS" --build-arg "$DOCKER_NPM_REGISTRY" --progress plain --push . + docker buildx build --tag "$SSHWIFTY_DOCKER_IMAGE_PUSH_TAG" --tag "$SSHWIFTY_DOCKER_IMAGE_PUSH_TAG_LATEST" --platform "$DOCKER_BUILD_TARGETS" --build-arg CUSTOM_COMMAND="$DOCKER_CUSTOM_COMMAND" --progress plain --push . ' \ ' mkdir -p ./.tmp/generated ./.tmp/release && diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 8fc56c0..c71854b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -24,9 +24,7 @@ jobs: export COVERALLS_TOKEN="${{ secrets.COVERALLS_TOKEN }}" export DOCKER_HUB_USER="${{ github.repository_owner }}" - # The `DOCKER_NPM_REGISTRY` is here due to problematic build process - # for ARM64 Docker Image caused by Docker/QEMU - export DOCKER_NPM_REGISTRY="http://registry.npmjs.org/" + export DOCKER_CUSTOM_COMMAND='echo "GitHub Action Build"' sudo apt-get update -qq -y sudo apt-get upgrade -qq -y diff --git a/Dockerfile b/Dockerfile index 5a94a86..f5970a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,8 @@ RUN set -ex && \ /try.sh update-ca-certificates -f && c_rehash && \ ([ -z "$HTTP_PROXY" ] || (git config --global http.proxy "$HTTP_PROXY" && npm config set proxy "$HTTP_PROXY")) && \ ([ -z "$HTTPS_PROXY" ] || (git config --global https.proxy "$HTTPS_PROXY" && npm config set https-proxy "$HTTPS_PROXY")) && \ - ([ -z "$NPM_REGISTRY" ] || (npm config set registry="$NPM_REGISTRY")) && \ export PATH=$PATH:"$(go env GOPATH)/bin" && \ + ([ -z "$CUSTOM_COMMAND" ] || (echo "Running custom command: $CUSTOM_COMMAND" && $CUSTOM_COMMAND)) && \ echo '#!/bin/sh' > /install.sh && echo "npm install -g npm || (npm cache clean -f && false)" >> /install.sh && chmod +x /install.sh && /try.sh /install.sh && rm /install.sh # Build the base environment for application libraries