mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Update github actions to use ubuntu-22.04 and use old actions file
This commit is contained in:
parent
ebd4694e9f
commit
9837c093fe
2 changed files with 15 additions and 31 deletions
7
.github/workflows/build_and_push.yml
vendored
7
.github/workflows/build_and_push.yml
vendored
|
|
@ -15,9 +15,10 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.branch || github.ref_name }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
|
|
@ -60,7 +61,7 @@ jobs:
|
|||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile.dev
|
||||
|
|
@ -68,4 +69,4 @@ jobs:
|
|||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM ruby:3.4.1-bookworm
|
||||
FROM ruby:3.4.1-alpine
|
||||
|
||||
ENV APP_PATH=/var/app
|
||||
ENV BUNDLE_VERSION=2.5.21
|
||||
|
|
@ -8,29 +8,20 @@ ENV RAILS_PORT=3000
|
|||
ENV RAILS_ENV=development
|
||||
|
||||
# Install dependencies for application
|
||||
RUN dpkg --add-architecture arm64 && \
|
||||
apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
RUN apk -U add --no-cache \
|
||||
build-base \
|
||||
git \
|
||||
postgresql-client:arm64 \
|
||||
libpq-dev:arm64 \
|
||||
libpq5:arm64 \
|
||||
postgresql-dev \
|
||||
postgresql-client \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
yarn \
|
||||
imagemagick \
|
||||
tzdata \
|
||||
less \
|
||||
libyaml-dev \
|
||||
gcc \
|
||||
g++ \
|
||||
make \
|
||||
libgeos-dev \
|
||||
libproj-dev \
|
||||
&& npm install -g yarn \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
yaml-dev \
|
||||
gcompat \
|
||||
&& mkdir -p $APP_PATH
|
||||
|
||||
# Update gem system and install bundler
|
||||
|
|
@ -42,18 +33,10 @@ WORKDIR $APP_PATH
|
|||
|
||||
COPY ../Gemfile ../Gemfile.lock ../.ruby-version ../vendor ./
|
||||
|
||||
# Set environment variables for compilation
|
||||
ENV CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing" \
|
||||
CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing" \
|
||||
MAKEFLAGS="-j2" \
|
||||
BUNDLE_FORCE_RUBY_PLATFORM="true"
|
||||
|
||||
# Install all gems into the image with reduced parallelism for ARM64
|
||||
# Install all gems into the image
|
||||
RUN bundle config set --local path 'vendor/bundle' \
|
||||
&& bundle config set --local jobs 2 \
|
||||
&& bundle config set build.nokogiri --use-system-libraries \
|
||||
&& bundle install --retry 3 \
|
||||
&& rm -rf vendor/bundle/ruby/3.4.0/cache/*.gem
|
||||
&& bundle install --jobs 4 --retry 3 \
|
||||
&& rm -rf vendor/bundle/ruby/3.3.0/cache/*.gem
|
||||
|
||||
# Copy the rest of the application
|
||||
COPY ../. ./
|
||||
|
|
|
|||
Loading…
Reference in a new issue