-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f19a334
commit 25857d1
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
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 }}" |
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