diff --git a/.github/workflows/build_and_push_docker_image.yml b/.github/workflows/build_and_push_docker_image.yml index 4b80a1a..be6efff 100644 --- a/.github/workflows/build_and_push_docker_image.yml +++ b/.github/workflows/build_and_push_docker_image.yml @@ -35,4 +35,4 @@ jobs: push: true tags: ${{ github.event.release.tag_name || steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - file: actionfiles/build_and_push_docker_image/Dockerfile + file: Dockerfile diff --git a/Dockerfile b/Dockerfile index d671bc3..caae770 100644 --- a/Dockerfile +++ b/Dockerfile @@ -176,6 +176,11 @@ COPY ./resources/php.ini /usr/local/etc/php/php.ini COPY ./resources/aqua.png resources/assets/aqua.png COPY ./composer.local.json composer.local.json +COPY ./build.sh . +RUN chmod +x ./build.sh +RUN ./build.sh +RUN rm ./build.sh + # TODO hack to address https://github.com/inblockio/DataAccounting/issues/244. # Remove this once MediaWiki has made a patch release. RUN sed -i 's/$this->package->setProvides( \[ $link \] );/$this->package->setProvides( \[ self::MEDIAWIKI_PACKAGE_NAME => $link \] );/' ./includes/composer/ComposerPackageModifier.php diff --git a/build.sh b/build.sh index 5d4c937..0503ed4 100755 --- a/build.sh +++ b/build.sh @@ -4,40 +4,22 @@ set -euo pipefail tweeki_version=2.0.3 pdfembed_version=2.0.2 -embedvideo_version=2.9.0 -mkdir -p skins if [ ! -d skins/Tweeki ]; then echo "Downloading Tweeki skin" wget https://github.com/thaider/Tweeki/archive/refs/tags/v${tweeki_version}.tar.gz tar xf v${tweeki_version}.tar.gz mv Tweeki-* skins/Tweeki + rm v${tweeki_version}.tar.gz fi -mkdir -p extensions +# TODO move to composer.local.json # https://www.mediawiki.org/wiki/Extension:PDFEmbed if [ ! -d extensions/PDFEmbed ]; then echo "Downloading PDFEmbed" wget https://gitlab.com/hydrawiki/extensions/PDFEmbed/-/archive/${pdfembed_version}/PDFEmbed-${pdfembed_version}.zip unzip PDFEmbed-${pdfembed_version}.zip mv PDFEmbed-${pdfembed_version}/ extensions/PDFEmbed + rm PDFEmbed-${pdfembed_version}.zip fi - -# https://github.com/wikimedia/mediawiki-extensions-intersection -# We have a problem getting a permanent download url for this extension. -#if [ ! -d extensions/intersection ]; then -# echo "Downloading intersection" -# wget -#fi - -# Is commented out because the extension is deprecated in it's current version in MW 1.37.X -# https://www.mediawiki.org/wiki/Extension:EmbedVideo -# Disabled per stakeholder request in DataAccounting/issues/189 -# if [ ! -d extensions/EmbedVideo ]; then -# echo "Downloading EmbedVideo" -# wget https://gitlab.com/hydrawiki/extensions/EmbedVideo/-/archive/v${embedvideo_version}/EmbedVideo-v${embedvideo_version}.zip -# unzip EmbedVideo-v${embedvideo_version}.zip -# mv EmbedVideo-v${embedvideo_version} extensions/EmbedVideo -# fip -docker build -t inblockio/micro-pkc-mediawiki .