This repository was archived by the owner on Nov 3, 2025. It is now read-only.
Docker Nightly Builder #2364
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: Docker Nightly Builder | |
| "on": | |
| push: | |
| branches: | |
| - trunk | |
| pull_request: | |
| branches: | |
| - trunk | |
| schedule: | |
| - cron: "0 0 * * *" # build nightly! | |
| permissions: {} | |
| jobs: | |
| nightly: | |
| name: Nightly | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| build: | |
| - alpine | |
| - debian | |
| - ubuntu | |
| include: | |
| - build: alpine | |
| target_triple: x86_64-unknown-linux-musl | |
| dockerfile: alpine/Dockerfile | |
| docker_target_platforms: linux/amd64 | |
| tag_bare: alpine | |
| tag_version: alpine3 | |
| - build: debian | |
| target_triple: x86_64-unknown-linux-gnu | |
| dockerfile: debian/bookworm/slim/Dockerfile | |
| docker_target_platforms: linux/amd64,linux/arm64 | |
| tag_bare: slim | |
| tag_version: slim-bookworm | |
| - build: ubuntu | |
| target_triple: x86_64-unknown-linux-gnu | |
| dockerfile: ubuntu/noble/Dockerfile | |
| docker_target_platforms: linux/amd64,linux/arm64 | |
| tag_bare: ubuntu | |
| tag_version: ubuntu-noble | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - name: Clone Artichoke | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: artichoke/artichoke | |
| path: artichoke | |
| persist-credentials: false | |
| - name: Set Artichoke latest commit | |
| id: latest | |
| working-directory: artichoke | |
| run: | | |
| echo "Artichoke git ref: $(git rev-parse HEAD)" | |
| echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3 | |
| with: | |
| version: "latest" | |
| enable-cache: false | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Set Artichoke Rust toolchain version | |
| id: rust_toolchain | |
| working-directory: artichoke | |
| shell: python | |
| run: | | |
| import os | |
| import tomllib | |
| with open("rust-toolchain.toml", "rb") as f: | |
| data = tomllib.load(f) | |
| toolchain = data["toolchain"]["channel"] | |
| print(f"Rust toolchain version: {toolchain}") | |
| with open(os.environ["GITHUB_OUTPUT"], "a") as f: | |
| print(f"version={toolchain}", file=f) | |
| - name: Set labels | |
| id: labels | |
| working-directory: artichoke | |
| shell: python | |
| run: | | |
| import datetime | |
| import os | |
| import tomllib | |
| with open("Cargo.toml", "rb") as f: | |
| data = tomllib.load(f) | |
| version = data["package"]["version"] | |
| version = f"{version}-nightly" | |
| print(f"Artichoke version: {version}") | |
| current_time = datetime.datetime.now(datetime.timezone.utc) | |
| build_timestamp = current_time.isoformat() | |
| with open(os.environ["GITHUB_OUTPUT"], "a") as f: | |
| print(f"artichoke_version={version}", file=f) | |
| print(f"build_timestamp={build_timestamp}", file=f) | |
| - name: Generate THIRDPARTY license listing | |
| uses: artichoke/generate_third_party@5e60601807f55fd22efcdbdfbdbc2f65d63436b1 # v1.16.0 | |
| with: | |
| artichoke_ref: ${{ steps.latest.outputs.commit }} | |
| target_triple: ${{ matrix.target_triple }} | |
| output_file: ${{ github.workspace }}/THIRDPARTY | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | |
| with: | |
| cache-binary: false | |
| - name: Login to DockerHub | |
| uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0 | |
| if: github.ref == 'refs/heads/trunk' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push Docker images | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| with: | |
| context: . | |
| platforms: ${{ matrix.docker_target_platforms }} | |
| file: ${{ matrix.dockerfile }} | |
| push: ${{ github.ref == 'refs/heads/trunk' }} | |
| tags: | | |
| artichokeruby/artichoke:${{ matrix.tag_bare }}-nightly | |
| artichokeruby/artichoke:${{ matrix.tag_version }}-nightly | |
| build-args: | | |
| ARTICHOKE_NIGHTLY_REVISION=${{ steps.latest.outputs.commit }} | |
| ARTICHOKE_NIGHTLY_VERSION=${{ steps.labels.outputs.artichoke_version }} | |
| BUILD_TIMESTAMP=${{ steps.labels.outputs.build_timestamp }} | |
| RUST_VERSION=${{ steps.rust_toolchain.outputs.version }} | |
| - name: Build and push Docker images (Ubuntu extra tags) | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | |
| if: matrix.build == 'ubuntu' | |
| with: | |
| context: . | |
| platforms: ${{ matrix.docker_target_platforms }} | |
| file: ${{ matrix.dockerfile }} | |
| push: ${{ github.ref == 'refs/heads/trunk' }} | |
| tags: | | |
| artichokeruby/artichoke:latest | |
| artichokeruby/artichoke:ubuntu24.04-nightly | |
| build-args: | | |
| ARTICHOKE_NIGHTLY_REVISION=${{ steps.latest.outputs.commit }} | |
| ARTICHOKE_NIGHTLY_VERSION=${{ steps.labels.outputs.artichoke_version }} | |
| BUILD_TIMESTAMP=${{ steps.labels.outputs.build_timestamp }} | |
| RUST_VERSION=${{ steps.rust_toolchain.outputs.version }} |