CI: install GNU tar in the CI image so actions/cache works #190
@@ -16,8 +16,11 @@ FROM php:${PHP_VERSION}-cli-alpine
|
|||||||
# (actions/checkout, actions/cache, actions/upload-artifact) *inside* the job
|
# (actions/checkout, actions/cache, actions/upload-artifact) *inside* the job
|
||||||
# container, and shells `run:` steps through bash.
|
# container, and shells `run:` steps through bash.
|
||||||
#
|
#
|
||||||
# coreutils, gawk, grep and sed replace the busybox applets with the GNU ones
|
# coreutils, gawk, grep, sed and tar replace the busybox applets with the GNU
|
||||||
# the workflow scripts are written against (`tac`, `grep --include`).
|
# ones the workflow scripts are written against (`tac`, `grep --include`).
|
||||||
|
# tar is not optional: actions/cache shells out to `tar --posix -P`, which
|
||||||
|
# busybox rejects outright, so every cache step fails without it. zstd is what
|
||||||
|
# actions/cache prefers over gzip when it is present.
|
||||||
#
|
#
|
||||||
# jq, curl, git and zip/unzip are used by release.yml and bin/build-zip.sh.
|
# jq, curl, git and zip/unzip are used by release.yml and bin/build-zip.sh.
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
@@ -30,8 +33,10 @@ RUN apk add --no-cache \
|
|||||||
jq \
|
jq \
|
||||||
nodejs \
|
nodejs \
|
||||||
sed \
|
sed \
|
||||||
|
tar \
|
||||||
unzip \
|
unzip \
|
||||||
zip \
|
zip \
|
||||||
|
zstd \
|
||||||
icu-libs \
|
icu-libs \
|
||||||
libzip \
|
libzip \
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
@@ -52,6 +57,7 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 \
|
|||||||
COMPOSER_HOME=/composer
|
COMPOSER_HOME=/composer
|
||||||
|
|
||||||
RUN mkdir -p "$COMPOSER_HOME" \
|
RUN mkdir -p "$COMPOSER_HOME" \
|
||||||
|
&& tar --version | head -1 | grep -q 'GNU tar' \
|
||||||
&& php -v \
|
&& php -v \
|
||||||
&& php -m | grep -qx intl \
|
&& php -m | grep -qx intl \
|
||||||
&& php -m | grep -qx mbstring \
|
&& php -m | grep -qx mbstring \
|
||||||
|
|||||||
+6
-2
@@ -30,8 +30,12 @@ inside the cluster replaces the whole thing (#187).
|
|||||||
(`actions/checkout`, `actions/cache`, `actions/upload-artifact`) *inside*
|
(`actions/checkout`, `actions/cache`, `actions/upload-artifact`) *inside*
|
||||||
the job container and shells `run:` steps through bash. Without these, the
|
the job container and shells `run:` steps through bash. Without these, the
|
||||||
first step of every job fails.
|
first step of every job fails.
|
||||||
- **`coreutils`, `gawk`, `grep`, `sed`** — GNU versions, because the workflow
|
- **`coreutils`, `gawk`, `grep`, `sed`, `tar`** — GNU versions, because the
|
||||||
scripts use `tac` and `grep --include`, which busybox does not provide.
|
workflow scripts use `tac` and `grep --include`, which busybox does not
|
||||||
|
provide. GNU `tar` matters most: `actions/cache` shells out to
|
||||||
|
`tar --posix -P`, and busybox rejects those flags, so every cache step fails
|
||||||
|
without it. `zstd` is what `actions/cache` reaches for over gzip when it is
|
||||||
|
installed.
|
||||||
- **`curl`, `jq`, `git`, `zip`, `unzip`** — used by `release.yml` and
|
- **`curl`, `jq`, `git`, `zip`, `unzip`** — used by `release.yml` and
|
||||||
`bin/build-zip.sh`.
|
`bin/build-zip.sh`.
|
||||||
- **`intl` and `zip` PHP extensions**, plus Composer 2. `mbstring` is already
|
- **`intl` and `zip` PHP extensions**, plus Composer 2. `mbstring` is already
|
||||||
|
|||||||
Reference in New Issue
Block a user