wip #3
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: 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" | |
CRYSTAL_VERSION: "${{ inputs.crystal_version || 'master' }}" | |
CRYSTAL_SHA1: "${{ inputs.crystal_version || 'master' }}" | |
PREVIOUS_CRYSTAL_VERSION: "${{ inputs.previous_crystal_version || '1.10.1' }}" | |
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 pull_images=true release=true | |
- 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 }}" |