Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions .github/workflows/publish-dev-ci-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@ on:
paths-ignore:
- "README.md"
- "LICENSE"
pull_request:
branches:
- ci/ci-base-image
paths-ignore:
- "README.md"
- "LICENSE"
env:
RUST_VERSION: 1.76.0
IMAGE_VERSION: 1.3.1
RUST_VERSION: 1.84.1
IMAGE_VERSION: 1.4.0
# 1.86.0
NIGHTLY_VERSION: nightly-2025-04-03

jobs:
publish-ci-base-image:
name: Publish CI Base Image
env:
IMAGE_NAME: ci-base-image
BRANCH_NAME: ${{github.ref_name}}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

permissions:
contents: read
Expand All @@ -40,6 +48,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -54,14 +63,15 @@ jobs:
script: return `ghcr.io/${context.repo.owner.toLowerCase()}/${context.repo.repo.toLowerCase()}`

- name: Build and Push Docker Image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
push: ${{ github.event_name == 'push' }}
file: ci-base-image.dockerfile
tags: |
${{steps.repo_slug.outputs.result}}/${{env.IMAGE_NAME}}:latest
${{steps.repo_slug.outputs.result}}/${{env.IMAGE_NAME}}:${{env.IMAGE_VERSION}}
build-args: |
IMAGE_VERSION=${{env.IMAGE_VERSION}}
RUST_VERSION=${{env.RUST_VERSION}}
NIGHTLY_VERSION=${{env.NIGHTLY_VERSION}}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ A branch specifically for building the CI Docker image and publishing it to the
- Go to [.github/workflows/publish-dev-ci-base-image.yml](.github/workflows/publish-dev-ci-base-image.yml)
- Update `RUST_VERSION` env var
- Bump `IMAGE_VERSION` env var
- Bump `NIGHTLY_VERSION` env var
- Go to [./ci-base-image.dockerfile](./ci-base-image.dockerfile)
- Update the `toolchain` references
- Push
Expand Down
13 changes: 8 additions & 5 deletions ci-base-image.dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# NOTE: If you make changes in this file, be sure to update IMAGE_VERSION in merge-pr.yml
# ci-base-image is published IF and ONLY IF changes are detected in this dockerfile.

FROM --platform=linux/amd64 ubuntu:22.04
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
LABEL maintainer="Frequency"
LABEL description="Frequency CI Base Image"
# Image version is set by the CI pipeline in merge-pr.yml
ARG IMAGE_VERSION
LABEL version="${IMAGE_VERSION}"
LABEL org.opencontainers.image.description "Frequency CI Base Image"
LABEL org.opencontainers.image.description="Frequency CI Base Image"
ARG RUST_VERSION
LABEL rust.version="${RUST_VERSION}"
ARG NIGHTLY_VERSION
LABEL rust.nightly-version="${NIGHTLY_VERSION}"

WORKDIR /ci
RUN apt-get update && \
Expand All @@ -23,8 +25,9 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/home/runner/.cargo/bin:/root/.cargo/bin:${PATH}"
ENV RUSTUP_HOME="/root/.cargo"
ENV CARGO_HOME="/root/.cargo"
RUN rustup toolchain install nightly-2024-03-01
RUN rustup target add x86_64-unknown-linux-gnu --toolchain nightly-2024-03-01
RUN rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-01
RUN rustup toolchain install "${NIGHTLY_VERSION}"
RUN rustup target add x86_64-unknown-linux-gnu --toolchain "${NIGHTLY_VERSION}"
RUN rustup target add wasm32-unknown-unknown --toolchain "${NIGHTLY_VERSION}"
RUN rustup component add rust-src --toolchain "${NIGHTLY_VERSION}"

RUN git config --system --add safe.directory /__w/frequency/frequency