mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -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
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.branch || github.ref_name }}
|
ref: ${{ github.event.inputs.branch || github.ref_name }}
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
|
@ -60,7 +61,7 @@ jobs:
|
||||||
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile.dev
|
file: ./docker/Dockerfile.dev
|
||||||
|
|
@ -68,4 +69,4 @@ jobs:
|
||||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
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 APP_PATH=/var/app
|
||||||
ENV BUNDLE_VERSION=2.5.21
|
ENV BUNDLE_VERSION=2.5.21
|
||||||
|
|
@ -8,29 +8,20 @@ ENV RAILS_PORT=3000
|
||||||
ENV RAILS_ENV=development
|
ENV RAILS_ENV=development
|
||||||
|
|
||||||
# Install dependencies for application
|
# Install dependencies for application
|
||||||
RUN dpkg --add-architecture arm64 && \
|
RUN apk -U add --no-cache \
|
||||||
apt-get update && apt-get install -y \
|
build-base \
|
||||||
build-essential \
|
|
||||||
git \
|
git \
|
||||||
postgresql-client:arm64 \
|
postgresql-dev \
|
||||||
libpq-dev:arm64 \
|
postgresql-client \
|
||||||
libpq5:arm64 \
|
|
||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
nodejs \
|
nodejs \
|
||||||
npm \
|
yarn \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
tzdata \
|
tzdata \
|
||||||
less \
|
less \
|
||||||
libyaml-dev \
|
yaml-dev \
|
||||||
gcc \
|
gcompat \
|
||||||
g++ \
|
|
||||||
make \
|
|
||||||
libgeos-dev \
|
|
||||||
libproj-dev \
|
|
||||||
&& npm install -g yarn \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& mkdir -p $APP_PATH
|
&& mkdir -p $APP_PATH
|
||||||
|
|
||||||
# Update gem system and install bundler
|
# Update gem system and install bundler
|
||||||
|
|
@ -42,18 +33,10 @@ WORKDIR $APP_PATH
|
||||||
|
|
||||||
COPY ../Gemfile ../Gemfile.lock ../.ruby-version ../vendor ./
|
COPY ../Gemfile ../Gemfile.lock ../.ruby-version ../vendor ./
|
||||||
|
|
||||||
# Set environment variables for compilation
|
# Install all gems into the image
|
||||||
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
|
|
||||||
RUN bundle config set --local path 'vendor/bundle' \
|
RUN bundle config set --local path 'vendor/bundle' \
|
||||||
&& bundle config set --local jobs 2 \
|
&& bundle install --jobs 4 --retry 3 \
|
||||||
&& bundle config set build.nokogiri --use-system-libraries \
|
&& rm -rf vendor/bundle/ruby/3.3.0/cache/*.gem
|
||||||
&& bundle install --retry 3 \
|
|
||||||
&& rm -rf vendor/bundle/ruby/3.4.0/cache/*.gem
|
|
||||||
|
|
||||||
# Copy the rest of the application
|
# Copy the rest of the application
|
||||||
COPY ../. ./
|
COPY ../. ./
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue