Inject the GITHUB_TOKEN secret into the container builder

This commit is contained in:
Mike Dalessio
2025-03-10 12:30:44 -04:00
parent 40256a4420
commit 9c26633673
4 changed files with 6 additions and 1 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ RUN apt-get update -qq && \
# Install application gems
COPY Gemfile Gemfile.lock .ruby-version ./
RUN bundle install && \
RUN --mount=type=secret,id=GITHUB_TOKEN \
BUNDLE_GITHUB__COM="$(cat /run/secrets/GITHUB_TOKEN):x-oauth-basic" bundle install && \
rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \
bundle exec bootsnap precompile --gemfile