Skip to content

Remove default RUBY_VERSION from base image Dockerfile #6

Remove default RUBY_VERSION from base image Dockerfile

Remove default RUBY_VERSION from base image Dockerfile #6

Workflow file for this run

name: Ruby
on:
push:
branches: [main]
paths:
- ruby/Dockerfile
pull_request:
paths:
- ruby/Dockerfile
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}/ruby
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
ruby-version:
- "3.3.10"
- "3.4.8"
- "4.0.1"
steps:
- uses: actions/checkout@v6
- uses: docker/setup-qemu-action@v4
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
if: github.event_name != 'pull_request'
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v7
with:
context: ruby
platforms: linux/amd64,linux/arm64
build-args: RUBY_VERSION=${{ matrix.ruby-version }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.ruby-version }}