Skip to content

Add Crystal 1.9

Add Crystal 1.9 #232

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- 'main'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- crystal_major_minor: 1.9
crystal_full: 1.9.0-dev+git.3268c81
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 }}
concurrency:
group: ${{ matrix.concurrency_group || format('{0}-{1}', github.run_id, matrix.crystal_full) }}
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Docker GitHub Registry Login
uses: docker/login-action@v2.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Metadata action
id: meta
uses: docker/metadata-action@v4.1.1
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/docker-build-cache-config-action@v1.13.0
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/goss-installation-action@v1.0.4
# 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/dive-action@0.0.4
# with:
# image: local-image:ci
# config-file: ${{ github.workspace }}/.dive-ci.yml