diff --git a/.github/workflows/maintenance-linux.yml b/.github/workflows/maintenance-linux.yml new file mode 100644 index 00000000..7f572ed6 --- /dev/null +++ b/.github/workflows/maintenance-linux.yml @@ -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 }}" diff --git a/docker/ubuntu.Dockerfile b/docker/ubuntu.Dockerfile index 5da78dd6..7af9a008 100644 --- a/docker/ubuntu.Dockerfile +++ b/docker/ubuntu.Dockerfile @@ -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 \