diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index d13d3aae..7d93f3ef 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -7,13 +7,13 @@ on: branches: - 'main' paths: - - 'images/**' + - 'images/Dockerfile.rtf' - '.github/workflows/images.yml' pull_request: branches: - 'main' paths: - - 'images/**' + - 'images/Dockerfile.rtf' - '.github/workflows/images.yml' env: @@ -48,6 +48,6 @@ jobs: with: context: images file: images/Dockerfile.rtf - push: true + push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/images/Dockerfile.codegen b/images/Dockerfile.codegen new file mode 100644 index 00000000..efb498e1 --- /dev/null +++ b/images/Dockerfile.codegen @@ -0,0 +1,25 @@ +FROM ubuntu:20.04 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential \ + clang \ + ca-certificates \ + curl \ + git \ + ssh \ + libssl-dev \ + pkg-config \ + libc6-dev \ + libc6-dev-arm64-cross \ + libc6-dev-armel-cross \ + libc6-dev-riscv64-cross \ + && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +ENV RUSTUP_HOME=/rust +ENV CARGO_HOME=/cargo +ENV PATH=/cargo/bin:/rust/bin:$PATH +RUN echo "(curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal -c rustfmt --default-toolchain nightly --no-modify-path) && rustup default nightly" > /install-rust.sh && chmod 755 /install-rust.sh +RUN ./install-rust.sh