Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ml] devkit #201

Merged
merged 1 commit into from
May 4, 2024
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
12 changes: 12 additions & 0 deletions .docker/ocaml.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM debian:unstable AS build
ARG VERSION
RUN apt update && apt install -y gcc build-essential curl unzip bubblewrap
RUN adduser --disabled-password dev
RUN echo | bash -c "sh <(curl -fsSL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)" && mkdir -p /home/dev/.opam/bin && mv /usr/local/bin/opam /home/dev/.opam/bin && chown -R dev /home/dev/.opam
USER dev
ENV PATH="/home/dev/.opam/bin:$PATH"
RUN opam init --compiler=${VERSION} --yes
RUN opam install ocamlsdl2 ocaml-lsp-server odoc ocamlformat utop --yes

FROM scratch
COPY --from=build /home/dev/.opam /home/dev/.opam
28 changes: 28 additions & 0 deletions .github/workflows/devkit-ocaml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Devkit (ocaml)

on:
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-22.04
strategy:
matrix:
lang: ["ocaml"]
version: ["5.1.1"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Publish
uses: elgohr/Publish-Docker-Github-Action@main
with:
name: shish2k/rosettaboy-devkit-${{ matrix.lang }}
dockerfile: .docker/${{ matrix.lang }}.dockerfile
buildoptions: "--build-arg VERSION=${{ matrix.version }}"
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: ${{ matrix.version }}
platforms: linux/amd64,linux/arm64