Use COmposer_auth env var for secret
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 28s

This commit is contained in:
PeterChrz 2026-03-31 00:16:01 -04:00
parent 840f2194f5
commit 7cf2ece6e6
Signed by untrusted user who does not match committer: pch
GPG key ID: 8F0826ECF7302C63

View file

@ -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 \