Skip to content

Commit

Permalink
build: disable gem cache and fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Seosamh Cahill committed May 30, 2023
1 parent 5fc2945 commit c8bafad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
name: Create and publish a Docker image

on:
workflow_run:
workflows:
- Test
types:
- completed
push:
branches: ['master']
branches:
- master

env:
REGISTRY: ghcr.io
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main
name: Test

on: [push]

Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# first stage
ARG GEM_IMAGE=registry.gitlab.com/abairt/web-application:master
# ARG GEM_IMAGE=registry.gitlab.com/abairt/web-application:master

FROM ${GEM_IMAGE} as gem-cache
# FROM ${GEM_IMAGE} as gem-cache
FROM ruby:3.0-slim as builder
USER root
ENV RAILS_ENV="production"
RUN apt update && apt install -y \
acl build-essential ca-certificates curl default-libmysqlclient-dev ghostscript git gzip imagemagick libaudit1 libbz2-1.0 libc6 libcap-ng0 libcom-err2 libcurl4 libgcc1 libgcrypt20 libgmp-dev libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libidn2-0 libjemalloc2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblzma5 libmariadb3 libncurses6 libncursesw6 libnghttp2-14 libp11-kit0 libpam0g libpq5 libpsl5 libreadline-dev librtmp1 libsasl2-2 libsqlite3-0 libsqlite3-dev libssh2-1 libssl-dev libssl1.1 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libxml2 libxml2-dev libxslt1-dev netcat netcat-traditional pkg-config procps sqlite3 sudo tar unzip wget zlib1g zlib1g-dev nodejs npm git gosu yui-compressor
COPY . /app
COPY --from=gem-cache /app/vendor/bundle /app/vendor/bundle
# COPY --from=gem-cache /app/vendor/bundle /app/vendor/bundle
WORKDIR /app
RUN \
bundle config set deployment 'true' && \
Expand Down

0 comments on commit c8bafad

Please sign in to comment.