Fix CI build caused by YAML float parsing #238
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- crystal_major_minor: '1.10' | |
crystal_full: '1.10.1' | |
target_platforms: linux/amd64,linux/arm64 | |
concurrency_group: compile-crystal | |
# - crystal_major_minor: 1.9 | |
# crystal_full: 1.9.2 | |
# target_platforms: linux/amd64,linux/arm64 | |
# concurrency_group: compile-crystal | |
# - crystal_major_minor: 1.8 | |
# crystal_full: 1.8.2 | |
# target_platforms: linux/amd64,linux/arm64 | |
# concurrency_group: compile-crystal | |
# - crystal_major_minor: 1.7 | |
# crystal_full: 1.7.3 | |
# target_platforms: linux/amd64,linux/arm64 | |
# concurrency_group: compile-crystal | |
# - crystal_major_minor: 1.6 | |
# crystal_full: 1.6.2 | |
# target_platforms: linux/amd64,linux/arm64 | |
# concurrency_group: compile-crystal | |
# - crystal_major_minor: 1.5 | |
# crystal_full: 1.5.1 | |
# target_platforms: linux/amd64,linux/arm64 | |
# concurrency_group: compile-crystal | |
# - crystal_major_minor: 1.4 | |
# crystal_full: 1.4.1 | |
# target_platforms: linux/amd64 | |
# - crystal_major_minor: 1.3 | |
# crystal_full: 1.3.2 | |
# target_platforms: linux/amd64 | |
# - crystal_major_minor: 1.2 | |
# crystal_full: 1.2.2 | |
# target_platforms: linux/amd64 | |
name: >- | |
Crystal ${{ matrix.crystal_full }} (${{ matrix.crystal_major_minor }}) | |
concurrency: | |
group: ${{ matrix.concurrency_group || format('{0}-{1}', github.run_id, matrix.crystal_full) }} | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Set up Depot CLI | |
uses: depot/setup-action@v1 | |
- name: Docker GitHub Registry Login | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Metadata action | |
id: meta | |
uses: docker/[email protected] | |
with: | |
flavor: | | |
latest=false | |
images: | | |
ghcr.io/luislavena/hydrofoil-crystal | |
tags: | | |
type=raw,${{ matrix.crystal_full }} | |
type=raw,${{ matrix.crystal_major_minor }} | |
- name: Setup Docker BuildKit cache strategy | |
uses: int128/[email protected] | |
id: cache | |
with: | |
image: ghcr.io/${{ github.repository }}/build-cache | |
tag-prefix: crystal-${{ matrix.crystal_major_minor }}-- | |
- name: Build Docker images | |
uses: depot/build-push-action@v1 | |
with: | |
project: ${{ secrets.DEPOT_PROJECT_ID }} | |
token: ${{ secrets.DEPOT_PROJECT_TOKEN }} | |
context: docker/${{ matrix.crystal_major_minor }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: ${{ matrix.target_platforms }} | |
push: ${{ github.event_name != 'pull_request' }} | |
cache-from: ${{ steps.cache.outputs.cache-from }} | |
cache-to: ${{ steps.cache.outputs.cache-to }} | |
# - name: Install Goss | |
# uses: e1himself/[email protected] | |
# with: | |
# version: 'v0.3.16' | |
# - name: Test Docker image | |
# run: dgoss run local-image:ci sleep infinity | |
# FIXME: Use latest version of Dive | |
# - name: Analyze image efficiency | |
# uses: yuichielectric/[email protected] | |
# with: | |
# image: local-image:ci | |
# config-file: ${{ github.workspace }}/.dive-ci.yml |