Skip to content

Commit

Permalink
Merge pull request #4 from AdWerx/colocate-base-image
Browse files Browse the repository at this point in the history
Colocate base image
  • Loading branch information
jbielick authored Nov 27, 2019
2 parents f0d8369 + 3401ed2 commit 274aace
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
36 changes: 29 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
FROM adwerx/pronto-ruby:1.2.0
FROM ruby:2.5

WORKDIR /runner
LABEL maintainer="Josh Bielick <[email protected]>"

ENV GITHUB_WORKSPACE /runner
ENV BUILD_PACKAGES bash ruby-dev build-essential cmake openssl yamllint
ENV RUNTIME_PACKAGES git

COPY Gemfile Gemfile.lock ./
RUN apt-get update && \
apt-get install -y $BUILD_PACKAGES && \
apt-get install -y $RUNTIME_PACKAGES && \
rm -rf /var/lib/apt/lists/*

RUN bundle
RUN gem install pronto

COPY . ./
ENV RUNNERS pronto-rubocop \
pronto-brakeman \
pronto-bundler_audit \
pronto-rails_best_practices \
pronto-rails_schema \
pronto-poper \
pronto-yamllint \
pronto-reek \
pronto-flay \
pronto-fasterer \
pronto-scss

ENTRYPOINT ["/runner/pronto"]
RUN gem install $RUNNERS

ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH

WORKDIR /data

ENTRYPOINT ["/usr/local/bundle/bin/pronto"]

CMD ["run"]
13 changes: 13 additions & 0 deletions Dockerfile.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM adwerx/pronto-ruby:1.2.0

WORKDIR /runner

ENV GITHUB_WORKSPACE /runner

COPY Gemfile Gemfile.lock ./

RUN bundle

COPY . ./

ENTRYPOINT ["/runner/pronto"]
35 changes: 0 additions & 35 deletions Dockerfile.base

This file was deleted.

2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ inputs:
origin/master
runs:
using: docker
image: Dockerfile
image: Dockerfile.action
args:
- run
- -r
Expand Down

0 comments on commit 274aace

Please sign in to comment.