Skip to content

initial

initial #2

name: Build Linux
on:
push:
pull_request:
workflow_dispatch:
inputs:
crystal_version:
required: true
default: "master"
type: string
previous_crystal_version:
required: true
default: "1.10.1"
type: string
env:
DOCKER_REPOSITORY: crystallang/crystal
jobs:
build-linux:
name: Build x86 Linux tarballs
runs-on: ubuntu-latest
steps:
- name: Checkout the distribution scripts
uses: actions/checkout@v3
- name: Build the linux binaries
working-directory: linux
run: make all no_cache=true pull_images=true release=true
env:
CRYSTAL_VERSION: ${{ inputs.crystal_version }}
PREVIOUS_CRYSTAL_VERSION: ${{ inputs.previous_crystal_version }}
- name: Upload the binaries for use in the next step
uses: actions/upload-artifact@v3
with:
name: linux-${{ inputs.crystal_version }}
path: linux/build/*.gz
package-docker:
name: Build the docker images
runs-on: ubuntu-latest
needs: build-linux
steps:
- name: Download the linux tarballs
uses: actions/download-artifact@v3
with:
name: linux-${{ inputs.CRYSTAL_VERSION }}
path: docker/build-context
- name: Build ubuntu
uses: docker/build-push-action@v5
with:
context: docker/build-context
file: docker/ubuntu.Dockerfile
push: false
load: true
tag: "${{ env.DOCKER_REPOSTIROY }}:${{ inputs.CRYSTAL_VERSION }}"
- name: Inspect
run: docker image inspect "${{ env.DOCKER_REPOSTIROY }}:${{ inputs.CRYSTAL_VERSION }}"