Skip to content

Update Crystal 1.13 to 1.13.3 #253

Update Crystal 1.13 to 1.13.3

Update Crystal 1.13 to 1.13.3 #253

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.13'
crystal_full: '1.13.3'
target_platforms: linux/amd64,linux/arm64
concurrency_group: compile-crystal
# - crystal_major_minor: '1.12'
# crystal_full: '1.12.2'
# target_platforms: linux/amd64,linux/arm64
# concurrency_group: compile-crystal
# - crystal_major_minor: '1.11'
# crystal_full: '1.11.2'
# target_platforms: linux/amd64,linux/arm64
# concurrency_group: compile-crystal
# - 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/checkout@v4
- name: Define build number
run: |
echo "HYDROFOIL_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Docker GitHub Registry Login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Metadata action
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
latest=false
images: |
ghcr.io/luislavena/hydrofoil-crystal
tags: |
type=raw,${{ matrix.crystal_full }}
type=raw,${{ matrix.crystal_full }}-${{ env.HYDROFOIL_COMMIT }}
type=raw,${{ matrix.crystal_major_minor }}
- name: Setup Docker BuildKit cache strategy
uses: int128/docker-build-cache-config-action@v1
id: cache
with:
image: ghcr.io/${{ github.repository }}/build-cache
flavor: 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