Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Nov 16, 2023
1 parent f19a334 commit 25857d1
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 1 deletion.
62 changes: 62 additions & 0 deletions .github/workflows/maintenance-linux.yml
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 }}"
2 changes: 1 addition & 1 deletion docker/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN \
libpcre3-dev libpcre2-dev libevent-dev libz-dev && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ARG crystal_targz
ARG crystal_targz=crystal.tar.gz
COPY ${crystal_targz} /tmp/crystal.tar.gz

RUN \
Expand Down

0 comments on commit 25857d1

Please sign in to comment.