Master #962
This file contains hidden or 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: Master | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 8 * * *' | |
| env: | |
| crystal_version: master | |
| shards_version: 0.19.1 | |
| gc_version: 8.2.8 | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| alpine: | |
| name: Alpine container | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - alpine_version: latest | |
| llvm_version: 16 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: depot/setup-action@v1 | |
| - uses: depot/build-push-action@v1 | |
| with: | |
| project: zjh7v82xv6 | |
| context: alpine | |
| no-cache: true | |
| pull: true | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| crystal_version=${{ env.crystal_version }} | |
| shards_version=${{ env.shards_version }} | |
| gc_version=${{ env.gc_version }} | |
| llvm_version=${{ matrix.llvm_version }} | |
| alpine_version=${{ matrix.alpine_version }} | |
| tags: | | |
| 84codes/crystal:${{ env.crystal_version }}-alpine-${{ matrix.alpine_version }} | |
| 84codes/crystal:${{ env.crystal_version }}-alpine | |
| pkgs: | |
| name: Debian/RPM static packages | |
| needs: alpine | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: depot/setup-action@v1 | |
| - uses: depot/build-push-action@v1 | |
| with: | |
| project: zjh7v82xv6 | |
| context: pkgs | |
| no-cache: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| crystal_version=${{ env.crystal_version }} | |
| pkg_revision=${{ github.run_number }} | |
| outputs: pkgs | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crystal-static-pkgs | |
| path: pkgs | |
| debian: | |
| name: Debian | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - base_image: ubuntu | |
| version: 24.04 | |
| codename: noble | |
| llvm_version: 18 | |
| - base_image: debian | |
| version: 12 | |
| codename: bookworm | |
| llvm_version: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: depot/setup-action@v1 | |
| - name: Export packages | |
| uses: depot/build-push-action@v1 | |
| with: | |
| project: zjh7v82xv6 | |
| context: debian | |
| no-cache: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| crystal_version=${{ env.crystal_version }} | |
| shards_version=${{ env.shards_version }} | |
| gc_version=${{ env.gc_version }} | |
| base_image=${{ matrix.base_image }} | |
| codename=${{ matrix.codename }} | |
| llvm_version=${{ matrix.llvm_version }} | |
| pkg_revision=${{ github.run_number }} | |
| target: pkgs | |
| outputs: pkgs | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crystal-${{ matrix.base_image }}-${{ matrix.version }}-pkgs | |
| path: pkgs | |
| - name: Build and push container | |
| uses: depot/build-push-action@v1 | |
| with: | |
| project: zjh7v82xv6 | |
| context: debian | |
| pull: true | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| crystal_version=${{ env.crystal_version }} | |
| shards_version=${{ env.shards_version }} | |
| gc_version=${{ env.gc_version }} | |
| base_image=${{ matrix.base_image }} | |
| codename=${{ matrix.codename }} | |
| llvm_version=${{ matrix.llvm_version }} | |
| tags: | | |
| 84codes/crystal:${{ env.crystal_version }}-${{ matrix.base_image }}-${{ matrix.version }} | |
| 84codes/crystal:${{ env.crystal_version }}-${{ matrix.base_image }}-${{ matrix.codename }} | |
| fedora: | |
| name: Fedora | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - base_image: fedora | |
| base_image_tag: 41 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| - uses: depot/setup-action@v1 | |
| - uses: depot/build-push-action@v1 | |
| name: Export packages | |
| with: | |
| project: zjh7v82xv6 | |
| context: fedora | |
| no-cache: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| crystal_version=${{ env.crystal_version }} | |
| gc_version=${{ env.gc_version }} | |
| llvm_version=${{ matrix.llvm_version }} | |
| base_image=${{ matrix.base_image }} | |
| base_image_tag=${{ matrix.base_image_tag }} | |
| pkg_revision=${{ github.run_number }} | |
| target: pkgs | |
| outputs: pkgs | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crystal-${{ matrix.base_image }}-${{ matrix.base_image_tag }}-pkgs | |
| path: pkgs | |
| - uses: depot/build-push-action@v1 | |
| name: Build and push container | |
| with: | |
| project: zjh7v82xv6 | |
| context: fedora | |
| pull: true | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| build-args: | | |
| crystal_version=${{ env.crystal_version }} | |
| gc_version=${{ env.gc_version }} | |
| llvm_version=${{ matrix.llvm_version }} | |
| base_image=${{ matrix.base_image }} | |
| base_image_tag=${{ matrix.base_image_tag }} | |
| pkg_revision=${{ github.run_number }} | |
| tags: | | |
| 84codes/crystal:${{ env.crystal_version }}-${{ matrix.base_image }}-${{ matrix.base_image_tag }} |