Skip to content

Merge pull request #11 from SonicGarden/ruby-3.3.6 #75

Merge pull request #11 from SonicGarden/ruby-3.3.6

Merge pull request #11 from SonicGarden/ruby-3.3.6 #75

name: Docker build and push
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
ECR_REGISTRY: public.ecr.aws
ECR_REGISTRY_ALIAS: sonicgarden
ECR_REPOSITORY: ruby
jobs:
build_and_push:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
ruby_version:
- '3.3.6'
- '3.3.5'
- '3.3.4'
- '3.3.3'
- '3.3.2'
- '3.3.1'
- '3.3.0'
- '3.2.6'
- '3.2.5'
- '3.2.4'
- '3.2.3'
- '3.2.2'
- '3.1.6'
- '3.1.5'
- '3.1.4'
- '3.0.7'
- '3.0.6'
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Public ECR
uses: docker/login-action@v3
with:
registry: ${{ env.ECR_REGISTRY }}
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
no-cache: true
build-args: |
RUBY_VERSION=${{ matrix.ruby_version }}
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REGISTRY_ALIAS }}/${{ env.ECR_REPOSITORY }}:${{ matrix.ruby_version }}