fix: if GITEA_TOKEN is not available does not try to set auth up
This commit is contained in:
@@ -17,6 +17,7 @@ RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli
|
|||||||
# install composer dependencies
|
# install composer dependencies
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
RUN --mount=type=secret,id=GITEA_TOKEN \
|
RUN --mount=type=secret,id=GITEA_TOKEN \
|
||||||
|
test -n "${GITEA_TOKEN}" && \
|
||||||
export TOKEN=$(cat /run/secrets/GITEA_TOKEN) && \
|
export TOKEN=$(cat /run/secrets/GITEA_TOKEN) && \
|
||||||
composer config --global auth.http-basic.seu-gitea.com token $TOKEN && \
|
composer config --global auth.http-basic.seu-gitea.com token $TOKEN && \
|
||||||
composer install --no-dev --optimize-autoloader
|
composer install --no-dev --optimize-autoloader
|
||||||
|
|||||||
Reference in New Issue
Block a user