mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 22:27:22 +00:00
lets see
This commit is contained in:
5
.github/workflows/cd.yml
vendored
5
.github/workflows/cd.yml
vendored
@@ -10,7 +10,6 @@ concurrency:
|
||||
|
||||
env:
|
||||
PROJECT: ${{ secrets.PROJECT }}
|
||||
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets._GITHUB_AUTH_TOKEN }}"}}'
|
||||
|
||||
jobs:
|
||||
build_service:
|
||||
@@ -49,7 +48,9 @@ jobs:
|
||||
- name: Prepare Composer Auth Secret
|
||||
run: |
|
||||
if [[ -n "${{ secrets._GITHUB_AUTH_TOKEN }}" ]]; then
|
||||
echo '${{ env.COMPOSER_AUTH }}' > composer-auth.json
|
||||
echo '{"github-oauth": {"github.com": "'${{ secrets._GITHUB_AUTH_TOKEN }}'"}}' > composer-auth.json
|
||||
else
|
||||
echo '{}' > composer-auth.json
|
||||
fi
|
||||
|
||||
- name: Build and Release
|
||||
|
||||
@@ -36,6 +36,7 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Set some build ENV variables
|
||||
ENV LOG_CHANNEL=stdout
|
||||
ENV CACHE_DRIVER=null
|
||||
|
||||
# For development only
|
||||
WORKDIR /var/www/html
|
||||
@@ -46,6 +47,12 @@ WORKDIR /var/www/html/api
|
||||
COPY --chown=www-data:nogroup ./api ./
|
||||
RUN chown -R www-data:www-data /var/www/html/api
|
||||
|
||||
# Setup composer root directory
|
||||
RUN mkdir -p /root/.composer
|
||||
|
||||
# Load the secret into the auth.json file.
|
||||
RUN --mount=type=secret,id=composer_auth,dst=/root/.composer/auth.json
|
||||
|
||||
# Setup logging
|
||||
# RUN mkdir -p ./storage/logs/ && ln -sf /dev/stdout ./storage/logs/laravel-$(date +'%Y-%m-%d').log
|
||||
RUN mkdir -p ./storage/logs/ && touch ./storage/logs/laravel-$(date +'%Y-%m-%d').log
|
||||
@@ -64,12 +71,6 @@ WORKDIR /
|
||||
# Create unique instance ID
|
||||
RUN echo $(cat /proc/sys/kernel/random/uuid) > /.fleetbase
|
||||
|
||||
# Setup composer root directory
|
||||
RUN mkdir -p /root/.composer
|
||||
|
||||
# Load the secret into the auth.json file.
|
||||
RUN --mount=type=secret,id=composer_auth,dst=/root/.composer/auth.json
|
||||
|
||||
# Set environment
|
||||
ARG ENVIRONMENT=production
|
||||
ENV APP_ENV=$ENVIRONMENT
|
||||
|
||||
Reference in New Issue
Block a user