Skip to content

Commit

Permalink
new base - rust-build (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
aviramha authored Jan 27, 2024
1 parent a40fe10 commit 995d490
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/rust-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release rust base images
on:
push:
branches: [main]
workflow_dispatch:

jobs:
builder:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: rust-build/Dockerfile
platforms: linux/amd64
push: true
tags: |
ghcr.io/metalbear-co/ci-rust-build:latest
ghcr.io/metalbear-co/ci-rust-build:${{ github.sha }}
8 changes: 8 additions & 0 deletions rust-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM buildpack-deps:bookworm as base

RUN apt-get update && apt-get install -y protobuf-compiler
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh
RUN chmod +x rustup-init.sh
RUN ./rustup-init.sh -y -c rustfmt --default-toolchain nightly-2023-12-07
ENV PATH="$PATH:/root/.cargo/bin"
RUN rustup target add --toolchain nightly-2023-12-07
1 change: 1 addition & 0 deletions rust-build/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rust + Nightly and protobuf, that's it.

0 comments on commit 995d490

Please sign in to comment.