-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.21 KB
/
ruby.yml
File metadata and controls
53 lines (46 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Ruby
on:
push:
branches: [main]
paths:
- ruby/Dockerfile
- .github/workflows/ruby.yml
pull_request:
paths:
- ruby/Dockerfile
- .github/workflows/ruby.yml
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"
- "3.4.9"
- "4.0.1"
- "4.0.2"
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 }}