Use COmposer_auth env var for secret
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 28s
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 28s
This commit is contained in:
parent
840f2194f5
commit
7cf2ece6e6
1 changed files with 3 additions and 1 deletions
|
|
@ -13,7 +13,9 @@ FROM composer:2 AS composer-builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
# Mount auth.json as a secret so it never gets baked into the image
|
# Mount auth.json as a secret so it never gets baked into the image
|
||||||
RUN --mount=type=secret,id=composer_auth,dst=/composer/auth.json \
|
RUN --mount=type=secret,id=composer_auth \
|
||||||
|
test -s /run/secrets/composer_auth || (echo "ERROR: composer_auth secret is missing or empty" && exit 1) && \
|
||||||
|
COMPOSER_AUTH=$(cat /run/secrets/composer_auth) \
|
||||||
composer install \
|
composer install \
|
||||||
--no-dev \
|
--no-dev \
|
||||||
--no-interaction \
|
--no-interaction \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue