Use restart #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test to build Docker image | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.ruby_version }}-${{ matrix.ubuntu_version }} ${{ matrix.arch }} | |
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }} | |
strategy: | |
matrix: | |
ubuntu_version: | |
- noble | |
- jammy | |
- focal | |
ruby_version: | |
- 3.1.6 | |
- 3.2.6 | |
- 3.3.7 | |
- 3.4.1 | |
- master | |
arch: | |
- amd64 | |
- arm64 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Build docker image | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: |- | |
rake docker:build ruby_version=${{ matrix.ruby_version }} \ | |
ubuntu_version=${{ matrix.ubuntu_version }} \ | |
arch=${{ matrix.arch }} | |
on_retry_command: sudo systemctl restart docker | |
- name: Check image | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: | | |
docker images | |
docker run rubylang/ruby:${{ matrix.ruby_version }}-${{ matrix.ubuntu_version }} ruby -v | |
on_retry_command: sudo systemctl restart docker |