File tree Expand file tree Collapse file tree 4 files changed +32
-38
lines changed
Expand file tree Collapse file tree 4 files changed +32
-38
lines changed Original file line number Diff line number Diff line change 7171 |grep 'Nette'
7272 env :
7373 container_name : adminer_design
74- - name : Verify that the design works (Submodule).
75- if : ${{ ! contains(steps.build.outputs.image, 'fastcgi') }}
76- run : |
77- docker run --name $container_name -d -e ADMINER_DESIGN=hydra ${{ steps.build.outputs.image }}
78- docker run -i --rm --link $container_name:$container_name buildpack-deps:curl \
79- curl -fsSL http://$container_name:8080/ \
80- |grep 'adminer.css'
81- docker run -i --rm --link $container_name:$container_name buildpack-deps:curl \
82- curl -fsSL http://$container_name:8080/adminer.css \
83- |grep 'Hydra-Dark-Theme-for-Adminer'
84- env :
85- container_name : adminer_design2
8674 - name : Verify that the default server works.
8775 if : ${{ ! contains(steps.build.outputs.image, 'fastcgi') }}
8876 run : |
Original file line number Diff line number Diff line change @@ -42,18 +42,15 @@ COPY *.php /var/www/html/
4242
4343ENV ADMINER_VERSION=4.8.1
4444ENV ADMINER_DOWNLOAD_SHA256=2fd7e6d8f987b243ab1839249551f62adce19704c47d3d0c8dd9e57ea5b9c6b3
45- ENV ADMINER_COMMIT=1f173e18bdf0be29182e0d67989df56eadea4754
45+ ENV ADMINER_SRC_DOWNLOAD_SHA256=ef832414296d11eed33e9d85fff3fb316c63f13f05fceb4a961cbe4cb2ae8712
4646
4747RUN set -x \
48- && apk add --no-cache --virtual .build-deps git \
49- && curl -fsSL "https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php" -o adminer.php \
48+ && curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \
5049&& echo "$ADMINER_DOWNLOAD_SHA256 adminer.php" |sha256sum -c - \
51- && git clone --recurse-submodules=designs --depth 1 --shallow-submodules --branch "v$ADMINER_VERSION" https://github.com/vrana/adminer.git /tmp/adminer \
52- && commit="$(git -C /tmp/adminer/ rev-parse HEAD)" \
53- && [ "$commit" = "$ADMINER_COMMIT" ] \
54- && cp -r /tmp/adminer/designs/ /tmp/adminer/plugins/ . \
55- && rm -rf /tmp/adminer/ \
56- && apk del --no-network .build-deps
50+ && curl -fsSL https://github.com/vrana/adminer/archive/v$ADMINER_VERSION.tar.gz -o source.tar.gz \
51+ && echo "$ADMINER_SRC_DOWNLOAD_SHA256 source.tar.gz" |sha256sum -c - \
52+ && tar xzf source.tar.gz --strip-components=1 "adminer-$ADMINER_VERSION/designs/" "adminer-$ADMINER_VERSION/plugins/" \
53+ && rm source.tar.gz
5754
5855COPY entrypoint.sh /usr/local/bin/
5956ENTRYPOINT [ "entrypoint.sh" , "docker-php-entrypoint" ]
Original file line number Diff line number Diff line change @@ -38,18 +38,15 @@ COPY *.php /var/www/html/
3838
3939ENV ADMINER_VERSION=4.8.1
4040ENV ADMINER_DOWNLOAD_SHA256=2fd7e6d8f987b243ab1839249551f62adce19704c47d3d0c8dd9e57ea5b9c6b3
41- ENV ADMINER_COMMIT=1f173e18bdf0be29182e0d67989df56eadea4754
41+ ENV ADMINER_SRC_DOWNLOAD_SHA256=ef832414296d11eed33e9d85fff3fb316c63f13f05fceb4a961cbe4cb2ae8712
4242
4343RUN set -x \
44- && apk add --no-cache --virtual .build-deps git \
45- && curl -fsSL "https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php" -o adminer.php \
44+ && curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \
4645&& echo "$ADMINER_DOWNLOAD_SHA256 adminer.php" |sha256sum -c - \
47- && git clone --recurse-submodules=designs --depth 1 --shallow-submodules --branch "v$ADMINER_VERSION" https://github.com/vrana/adminer.git /tmp/adminer \
48- && commit="$(git -C /tmp/adminer/ rev-parse HEAD)" \
49- && [ "$commit" = "$ADMINER_COMMIT" ] \
50- && cp -r /tmp/adminer/designs/ /tmp/adminer/plugins/ . \
51- && rm -rf /tmp/adminer/ \
52- && apk del --no-network .build-deps
46+ && curl -fsSL https://github.com/vrana/adminer/archive/v$ADMINER_VERSION.tar.gz -o source.tar.gz \
47+ && echo "$ADMINER_SRC_DOWNLOAD_SHA256 source.tar.gz" |sha256sum -c - \
48+ && tar xzf source.tar.gz --strip-components=1 "adminer-$ADMINER_VERSION/designs/" "adminer-$ADMINER_VERSION/plugins/" \
49+ && rm source.tar.gz
5350
5451COPY entrypoint.sh /usr/local/bin/
5552ENTRYPOINT [ "entrypoint.sh" , "docker-php-entrypoint" ]
Original file line number Diff line number Diff line change @@ -9,15 +9,20 @@ if [ ${#versions[@]} -eq 0 ]; then
99fi
1010versions=( " ${versions[@]%/ } " )
1111
12- read -r commit_hash fullVersion << EOF
13- $( git ls-remote --tags https://github.com/vrana/adminer.git \
14- | awk ' {gsub(/refs\/tags\/v/, "", $2); print}' \
15- | sort -rVk2 \
16- | head -1)
17- EOF
12+ allVersions=" $(
13+ git ls-remote --tags https://github.com/vrana/adminer.git \
14+ | cut -d$' \t ' -f2 \
15+ | grep -E ' ^refs/tags/v[0-9]+\.[0-9]+' \
16+ | cut -dv -f2 \
17+ | sort -rV
18+ ) "
1819
1920for version in " ${versions[@]} " ; do
20- if [[ " $fullVersion " != $version * ]]; then
21+ fullVersion=" $(
22+ grep -E " ^${version} ([.-]|$)" <<< " $allVersions" \
23+ | head -1
24+ ) "
25+ if [ -z " $fullVersion " ]; then
2126 echo >&2 " error: cannot determine full version for '$version '"
2227 fi
2328
@@ -30,10 +35,17 @@ for version in "${versions[@]}"; do
3035 ) "
3136 echo " - adminer-${fullVersion} .php: $downloadSha256 "
3237
38+ srcDownloadSha256=" $(
39+ curl -fsSL " https://github.com/vrana/adminer/archive/v${fullVersion} .tar.gz" \
40+ | sha256sum \
41+ | cut -d' ' -f1
42+ ) "
43+ echo " - v${fullVersion} .tar.gz: $srcDownloadSha256 "
44+
3345 sed -ri \
3446 -e ' s/^(ENV\s+ADMINER_VERSION=).*/\1' " $fullVersion " ' /' \
3547 -e ' s/^(ENV\s+ADMINER_DOWNLOAD_SHA256=).*/\1' " $downloadSha256 " ' /' \
36- -e ' s/^(ENV\s+ADMINER_COMMIT =).*/\1' " $commit_hash " ' /' \
48+ -e ' s/^(ENV\s+ADMINER_SRC_DOWNLOAD_SHA256 =).*/\1' " $srcDownloadSha256 " ' /' \
3749 " $version /fastcgi/Dockerfile" \
3850 " $version /Dockerfile"
3951done
You can’t perform that action at this time.
0 commit comments