-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM debian:unstable AS build | ||
ARG VERSION | ||
RUN apt update && apt install -y wget adduser git | ||
RUN adduser --disabled-password dev | ||
RUN apt-get install -y --no-install-recommends \ | ||
make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev \ | ||
libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev \ | ||
libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \ | ||
&& apt-get install -y mecab-ipadic-utf8 | ||
USER dev | ||
ENV PYENV_ROOT="/home/dev/.pyenv" | ||
ENV PATH="/home/dev/.pyenv/shims:/home/dev/.pyenv/bin:$PATH" | ||
RUN git clone --depth=1 https://github.com/yyuu/pyenv /home/dev/.pyenv \ | ||
&& pyenv install ${VERSION} \ | ||
&& pyenv global ${VERSION} \ | ||
&& pyenv rehash | ||
|
||
FROM scratch | ||
COPY --from=build /home/dev/.pyenv /home/dev/.pyenv |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Devkit (python) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
paths: | ||
- '.docker/python.dockerfile' | ||
- '.github/workflows/devkit-python.yml' | ||
pull_request: | ||
paths: | ||
- '.docker/python.dockerfile' | ||
- '.github/workflows/devkit-python.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
lang: ["python"] | ||
version: ["3.11.5"] | ||
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 |