Skip to content

Commit 6ba7083

Browse files
committed
DEV: Build image with ruby 3.3.8 and 3.4.7
1 parent ea176cd commit 6ba7083

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,37 @@ jobs:
187187
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
188188
docker tag discourse/base:build_release_main_amd64 discourse/base:release-ruby-3.4.7
189189
docker push discourse/base:release-ruby-3.4.7
190+
multi_rubies:
191+
runs-on: debian-12-8core
192+
timeout-minutes: 30
193+
needs: base
194+
steps:
195+
- uses: actions/checkout@v3
196+
with:
197+
fetch-depth: 1
198+
- name: build slim image
199+
run: |
200+
cd image && ruby auto_build.rb base_slim_main_amd64 --build-arg="FROM_DOCKER_IMAGE_TAG=3.3.8-and-3.4.7-bookworm-slim"
201+
- name: build release image
202+
run: |
203+
cd image && ruby auto_build.rb base_release_main_amd64 --build-arg="FROM_DOCKER_IMAGE_TAG=3.3.8-and-3.4.7-bookworm-slim"
204+
- name: build test_build image
205+
run: |
206+
cd image && ruby auto_build.rb discourse_test_build_amd64 --build-arg="FROM_DOCKER_IMAGE_TAG=3.3.8-and-3.4.7-bookworm-slim"
207+
- name: run specs
208+
run: |
209+
docker run --rm -e RUBY_ONLY=1 -e USE_TURBO=1 -e SKIP_PLUGINS=1 -e SKIP_LINT=1 discourse/discourse_test:build_amd64
210+
- name: Print summary
211+
run: |
212+
docker images discourse/base
213+
- name: push to dockerhub
214+
if: success() && (github.ref == 'refs/heads/main')
215+
env:
216+
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
217+
run: |
218+
docker login --username discoursebuild --password $DOCKERHUB_PASSWORD
219+
docker tag discourse/base:build_release_main_amd64 discourse/base:release-ruby-3.3.8-and-3.4.7
220+
docker push discourse/base:release-ruby-3.3.8-and-3.4.7
190221
push_multi_arch_manifests:
191222
runs-on: ubuntu-latest
192223
needs: [base, timestamp]

image/base/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
ARG DEBIAN_RELEASE=bookworm
55
ARG RUBY_VERSION=3.3.8
6+
ARG FROM_DOCKER_IMAGE_TAG=${RUBY_VERSION}-${DEBIAN_RELEASE}-slim
67

7-
FROM discourse/ruby:${RUBY_VERSION}-${DEBIAN_RELEASE}-slim AS builder
8+
FROM discourse/ruby:${FROM_DOCKER_IMAGE_TAG} AS builder
89
ARG DEBIAN_RELEASE
910
ENV DEBIAN_RELEASE=${DEBIAN_RELEASE}
1011
RUN echo "deb http://deb.debian.org/debian ${DEBIAN_RELEASE}-backports main" > "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-backports.list"
@@ -30,7 +31,7 @@ RUN gpg --import /tmp/nginx_public_keys.key &&\
3031
rm /tmp/nginx_public_keys.key &&\
3132
/tmp/install-nginx
3233

33-
FROM discourse/ruby:${RUBY_VERSION}-${DEBIAN_RELEASE}-slim AS discourse_dependencies
34+
FROM discourse/ruby:${FROM_DOCKER_IMAGE_TAG} AS discourse_dependencies
3435

3536
ARG DEBIAN_RELEASE
3637
ARG PG_MAJOR=15

0 commit comments

Comments
 (0)